Deck 13: Array Applications

ملء الشاشة (f)
exit full mode
سؤال
The condition IF A = 5 AND B > 10 will be true if

A)A = 5 is true
B)B > 10 is true
C)both A = 5 and B > 10 are true
D)all of the above
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Arranging the values in a table in a certain sequence is often referred to as

A)loading a table
B)sorting a table
C)searching a table
D)defining a table
سؤال
Reading a table into computer storage is often referred to as

A)loading a table
B)sorting a table
C)searching a table
D)defining a table
سؤال
What is the value of X after the instructions corresponding to the following pseudocode are executed?
X=5Y=7\begin{array} { l } \mathrm { X } = 5 \\\mathrm { Y } = 7\end{array}
IF INT(5.4)=X\operatorname { INT } ( 5.4 ) = \mathrm { X } AND INT(6.9) =Y= \mathrm { Y } THEN X=X+Y\mathrm { X } = \mathrm { X } + \mathrm { Y }
ELSE
Y=Y+1\mathrm { Y } = \mathrm { Y } + 1
ENDIF

A)5
B)7
C)8
D)12
سؤال
What is the value of X after the instructions corresponding to the following pseudocode are executed?
X=5Y=7 IF INT(5.4)=XORINT(7.0)=Y THEN X=X+Y ELSE Y=Y+1\begin{array} { l } \mathrm { X } = 5 \\\mathrm { Y } = 7 \\\text { IF } \operatorname { INT } ( 5.4 ) = \mathrm { X } \mathrm { OR } \mathrm { INT } ( 7.0 ) = \mathrm { Y } \text { THEN } \\\mathrm { X } = \mathrm { X } + \mathrm { Y } \\\text { ELSE } \\\mathrm { Y } = \mathrm { Y } + 1 \\\end{array}
ENDIF

A)5
B)7
C)8
D)12
سؤال
Looking up values in a table is often referred to as

A)loading a table
B)sorting a table
C)searching a table
D)defining a table
سؤال
In a binary search,the search begins with an entry at the beginning of the table.
سؤال
What is the value of X after the instructions corresponding to the following pseudocode are executed?
X=6Y=7\begin{array} { l } X = 6 \\Y = 7\end{array}
IFINT(5.5)=X\operatorname { IF } \operatorname { INT } ( 5.5 ) = \mathrm { X } OR INT(6.9)=Y\operatorname { INT } ( 6.9 ) = \mathrm { Y } THEN
X=X+Y\mathrm { X } = \mathrm { X } + \mathrm { Y }
ELSE
Y=Y+1Y = Y + 1
ENDIF

A)6
B)7
C)8
D)13
سؤال
What is the value of COUNT after the steps in the following pseudocode are executed?
 COUNT =0 TOTAL =5 PASS =4 DOWHILE PASS < TOTAL  NEXT = PASS +1 DOWHILE NEXT  TOTAL  COUNT = COUNT +1 NEXT = NEXT +1 ENDDO  PASS = PASS +1\begin{array} { l } \text { COUNT } = 0 \\\text { TOTAL } = 5 \\\text { PASS } = 4 \\\text { DOWHILE PASS } < \text { TOTAL } \\\quad \text { NEXT } = \text { PASS } + 1 \\\text { DOWHILE NEXT } \leq \text { TOTAL } \\\quad \text { COUNT } = \text { COUNT } + 1 \\\quad \text { NEXT } = \text { NEXT } + 1 \\\text { ENDDO } \\\text { PASS } = \text { PASS } + 1\end{array}
ENDDO

A)4
B)5
C)10
D)none of the above
سؤال
A binary search should be considered when

A)the frequency of use of table entries is evenly distributed
B)the number of entries in the table is very large
C)processing efficiency is mandatory
D)all of the above
سؤال
The condition IF A = 5 OR B > 10 will be true if

A)A = 5 is true
B)B > 10 is true
C)both A = 5 and B > 10 are true
D)all of the above
سؤال
What is the value of X if X = INT(3.4)+ INT(7.9)?

A)10
B)11
C)11.3
D)12
سؤال
The result of an AND operation will be true if all of the conditions are met.
سؤال
The keywords AND and OR are examples of

A)program switches
B)string variables
C)Boolean operators
D)key fields
سؤال
What is the maximum number of comparisons that would be needed to determine whether or not a match is found in a sequential search of 64 elements?

A)6
B)7
C)63
D)64
سؤال
A program switch must always contain one of two values - 0 or 1.
سؤال
What is the name of the field that is in either ascending or descending order and will be searched when a table-lookup is performed?

A)program switch
B)key field
C)search key
D)both b and c
سؤال
What is the maximum number of comparisons that would be needed to determine whether or not a match is found in a binary search of 64 elements?

A)6
B)7
C)63
D)64
سؤال
In a binary search,the entries in the table being searched must be in either ascending or descending sequence.
سؤال
The result of an OR operation will be true if one but not both of the conditions are met.
سؤال
If X = INT(6.5)then the value of X is 7.
سؤال
The name of the field that is in either ascending or descending order and will be searched when a table-lookup is performed is called the search key.
سؤال
A sequential search is more efficient than a binary search.
سؤال
The binary search technique is particularly valuable when a table contains only a few entries.
سؤال
A sequence check must always be performed on data that will be searched.
سؤال
A program switch can be used as a loop control variable.
سؤال
Loading a table is usually done in the initialization portion of a program.
سؤال
After the first pass of a descending sort operation is completed,the last value in the group is definitely known to contain the smallest value.
سؤال
After the first pass of an ascending sort operation is completed,the first value in the group is definitely known to contain the smallest value.
سؤال
In a binary search when the lower bound is found to be greater than the upper bound,we know that the value being searched for has been found.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/30
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 13: Array Applications
1
The condition IF A = 5 AND B > 10 will be true if

A)A = 5 is true
B)B > 10 is true
C)both A = 5 and B > 10 are true
D)all of the above
C
2
Arranging the values in a table in a certain sequence is often referred to as

A)loading a table
B)sorting a table
C)searching a table
D)defining a table
B
3
Reading a table into computer storage is often referred to as

A)loading a table
B)sorting a table
C)searching a table
D)defining a table
A
4
What is the value of X after the instructions corresponding to the following pseudocode are executed?
X=5Y=7\begin{array} { l } \mathrm { X } = 5 \\\mathrm { Y } = 7\end{array}
IF INT(5.4)=X\operatorname { INT } ( 5.4 ) = \mathrm { X } AND INT(6.9) =Y= \mathrm { Y } THEN X=X+Y\mathrm { X } = \mathrm { X } + \mathrm { Y }
ELSE
Y=Y+1\mathrm { Y } = \mathrm { Y } + 1
ENDIF

A)5
B)7
C)8
D)12
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
5
What is the value of X after the instructions corresponding to the following pseudocode are executed?
X=5Y=7 IF INT(5.4)=XORINT(7.0)=Y THEN X=X+Y ELSE Y=Y+1\begin{array} { l } \mathrm { X } = 5 \\\mathrm { Y } = 7 \\\text { IF } \operatorname { INT } ( 5.4 ) = \mathrm { X } \mathrm { OR } \mathrm { INT } ( 7.0 ) = \mathrm { Y } \text { THEN } \\\mathrm { X } = \mathrm { X } + \mathrm { Y } \\\text { ELSE } \\\mathrm { Y } = \mathrm { Y } + 1 \\\end{array}
ENDIF

A)5
B)7
C)8
D)12
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
6
Looking up values in a table is often referred to as

A)loading a table
B)sorting a table
C)searching a table
D)defining a table
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
7
In a binary search,the search begins with an entry at the beginning of the table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
8
What is the value of X after the instructions corresponding to the following pseudocode are executed?
X=6Y=7\begin{array} { l } X = 6 \\Y = 7\end{array}
IFINT(5.5)=X\operatorname { IF } \operatorname { INT } ( 5.5 ) = \mathrm { X } OR INT(6.9)=Y\operatorname { INT } ( 6.9 ) = \mathrm { Y } THEN
X=X+Y\mathrm { X } = \mathrm { X } + \mathrm { Y }
ELSE
Y=Y+1Y = Y + 1
ENDIF

A)6
B)7
C)8
D)13
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
9
What is the value of COUNT after the steps in the following pseudocode are executed?
 COUNT =0 TOTAL =5 PASS =4 DOWHILE PASS < TOTAL  NEXT = PASS +1 DOWHILE NEXT  TOTAL  COUNT = COUNT +1 NEXT = NEXT +1 ENDDO  PASS = PASS +1\begin{array} { l } \text { COUNT } = 0 \\\text { TOTAL } = 5 \\\text { PASS } = 4 \\\text { DOWHILE PASS } < \text { TOTAL } \\\quad \text { NEXT } = \text { PASS } + 1 \\\text { DOWHILE NEXT } \leq \text { TOTAL } \\\quad \text { COUNT } = \text { COUNT } + 1 \\\quad \text { NEXT } = \text { NEXT } + 1 \\\text { ENDDO } \\\text { PASS } = \text { PASS } + 1\end{array}
ENDDO

A)4
B)5
C)10
D)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
10
A binary search should be considered when

A)the frequency of use of table entries is evenly distributed
B)the number of entries in the table is very large
C)processing efficiency is mandatory
D)all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
11
The condition IF A = 5 OR B > 10 will be true if

A)A = 5 is true
B)B > 10 is true
C)both A = 5 and B > 10 are true
D)all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
12
What is the value of X if X = INT(3.4)+ INT(7.9)?

A)10
B)11
C)11.3
D)12
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
13
The result of an AND operation will be true if all of the conditions are met.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
14
The keywords AND and OR are examples of

A)program switches
B)string variables
C)Boolean operators
D)key fields
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
15
What is the maximum number of comparisons that would be needed to determine whether or not a match is found in a sequential search of 64 elements?

A)6
B)7
C)63
D)64
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
16
A program switch must always contain one of two values - 0 or 1.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
17
What is the name of the field that is in either ascending or descending order and will be searched when a table-lookup is performed?

A)program switch
B)key field
C)search key
D)both b and c
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
18
What is the maximum number of comparisons that would be needed to determine whether or not a match is found in a binary search of 64 elements?

A)6
B)7
C)63
D)64
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
19
In a binary search,the entries in the table being searched must be in either ascending or descending sequence.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
20
The result of an OR operation will be true if one but not both of the conditions are met.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
21
If X = INT(6.5)then the value of X is 7.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
22
The name of the field that is in either ascending or descending order and will be searched when a table-lookup is performed is called the search key.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
23
A sequential search is more efficient than a binary search.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
24
The binary search technique is particularly valuable when a table contains only a few entries.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
25
A sequence check must always be performed on data that will be searched.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
26
A program switch can be used as a loop control variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
27
Loading a table is usually done in the initialization portion of a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
28
After the first pass of a descending sort operation is completed,the last value in the group is definitely known to contain the smallest value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
29
After the first pass of an ascending sort operation is completed,the first value in the group is definitely known to contain the smallest value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
30
In a binary search when the lower bound is found to be greater than the upper bound,we know that the value being searched for has been found.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.