Deck 13: Array Applications
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/30
Play
Full screen (f)
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
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
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)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?
IF AND INT(6.9) THEN
ELSE
ENDIF
A)5
B)7
C)8
D)12
IF AND INT(6.9) THEN
ELSE
ENDIF
A)5
B)7
C)8
D)12
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
5
What is the value of X after the instructions corresponding to the following pseudocode are executed?
ENDIF
A)5
B)7
C)8
D)12
ENDIF
A)5
B)7
C)8
D)12
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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
A)loading a table
B)sorting a table
C)searching a table
D)defining a table
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
7
In a binary search,the search begins with an entry at the beginning of the table.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
8
What is the value of X after the instructions corresponding to the following pseudocode are executed?
OR THEN
ELSE
ENDIF
A)6
B)7
C)8
D)13
OR THEN
ELSE
ENDIF
A)6
B)7
C)8
D)13
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
9
What is the value of COUNT after the steps in the following pseudocode are executed?
ENDDO
A)4
B)5
C)10
D)none of the above
ENDDO
A)4
B)5
C)10
D)none of the above
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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
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
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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
A)A = 5 is true
B)B > 10 is true
C)both A = 5 and B > 10 are true
D)all of the above
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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
A)10
B)11
C)11.3
D)12
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
13
The result of an AND operation will be true if all of the conditions are met.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
14
The keywords AND and OR are examples of
A)program switches
B)string variables
C)Boolean operators
D)key fields
A)program switches
B)string variables
C)Boolean operators
D)key fields
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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
A)6
B)7
C)63
D)64
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
16
A program switch must always contain one of two values - 0 or 1.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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
A)program switch
B)key field
C)search key
D)both b and c
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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
A)6
B)7
C)63
D)64
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
19
In a binary search,the entries in the table being searched must be in either ascending or descending sequence.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
20
The result of an OR operation will be true if one but not both of the conditions are met.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
21
If X = INT(6.5)then the value of X is 7.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
23
A sequential search is more efficient than a binary search.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
24
The binary search technique is particularly valuable when a table contains only a few entries.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
25
A sequence check must always be performed on data that will be searched.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
26
A program switch can be used as a loop control variable.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
27
Loading a table is usually done in the initialization portion of a program.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck