Deck 8: Processing Arrays
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/22
Play
Full screen (f)
Deck 8: Processing Arrays
1
11.Arrays are used:
A)When multiple values of a variable need to be saved in the computer's memory to be used later in the processing.
B)When a variable has more than one value.
C)Anytime when a set of numbers needs to be summed.
D)When the user does not know the number of values needed for a variable.
A)When multiple values of a variable need to be saved in the computer's memory to be used later in the processing.
B)When a variable has more than one value.
C)Anytime when a set of numbers needs to be summed.
D)When the user does not know the number of values needed for a variable.
A
2
7.Data structures is the way data is stored for usage.
True
3
10.When using an automatic counter loop to print an array,you must have an incrementor for the element number.
False
4
21.A two-dimensional array that will accumulate the rows and columns:
A)Should have an additional row and column specified for the totals.
B)Should use two other one-dimensional arrays for the totals.
C)Should have a third dimension for the totals.
D)None of the above.
A)Should have an additional row and column specified for the totals.
B)Should use two other one-dimensional arrays for the totals.
C)Should have a third dimension for the totals.
D)None of the above.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
5
15.To sum the rows and columns of a two-dimensional array:
A)The rows are summed,then the columns,and finally the grand total.
B)The columns are summed,then the rows,and finally the grand total.
C)The rows and columns are summed together.
D)The rows and columns are summed in the same inner loop with the results placed in an added row and an added column.The grand total is summed in the outer loop.
A)The rows are summed,then the columns,and finally the grand total.
B)The columns are summed,then the rows,and finally the grand total.
C)The rows and columns are summed together.
D)The rows and columns are summed in the same inner loop with the results placed in an added row and an added column.The grand total is summed in the outer loop.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
6
20.Printing a two dimensional array:
A)Is the same as printing a one-dimensional array.
B)Must have a carriage return after printing each row,instead of after each element.
C)Is printed in a single loop.
D)Does not need a carriage return.
A)Is the same as printing a one-dimensional array.
B)Must have a carriage return after printing each row,instead of after each element.
C)Is printed in a single loop.
D)Does not need a carriage return.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
7
8.The element numbers are the same in an array that uses the base-zero system and an array that uses base-one system.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
8
5.There are only one-dimensional and two-dimensional arrays.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
9
6.A static array has a constant number of memory locations saved for its values.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
10
4.A two dimensional array is similar to a table that has rows and columns.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
11
22.A sequential search
A)Starts with the first element of an array and searches each element until the correct one is found.
B)Starts with the last element of an array and searches upward until the correct one is found.
C)Starts with the middle element of an array and searches each direction until the correct one is found.
D)Does not have to have the array in order.
A)Starts with the first element of an array and searches each element until the correct one is found.
B)Starts with the last element of an array and searches upward until the correct one is found.
C)Starts with the middle element of an array and searches each direction until the correct one is found.
D)Does not have to have the array in order.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
12
16.To print an array,you should use:
A)IF/THEN/ELSE instruction.
B)REPEAT/UNTIL.
C)WHILE/WHILE-END.
D)Automatic counter loop.
A)IF/THEN/ELSE instruction.
B)REPEAT/UNTIL.
C)WHILE/WHILE-END.
D)Automatic counter loop.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
13
3.The decision structure is used to enter data into an array.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
14
13.The table look up technique:
A)Searches sequentially through the table to find the correct value.
B)Uses the element number to find the correct value.
C)Uses the value in one array to find the value in another array.
D)None of the above.
A)Searches sequentially through the table to find the correct value.
B)Uses the element number to find the correct value.
C)Uses the value in one array to find the value in another array.
D)None of the above.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
15
18.Parallel arrays:
A)Must be loaded in separate loops.
B)May be loaded in the same loop.
C)Contains data that is unrelated.
D)Must have calculated values.
A)Must be loaded in separate loops.
B)May be loaded in the same loop.
C)Contains data that is unrelated.
D)Must have calculated values.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
16
9.You must use an array starting with the first element.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
17
1.An array allows the user to use multiple values for one variable name.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
18
12.Two dimensional arrays are processed:
A)Through the use of nested decisions.
B)Through the use of a case structure.
C)Through the use of nested loops.
D)None of the above.
A)Through the use of nested decisions.
B)Through the use of a case structure.
C)Through the use of nested loops.
D)None of the above.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
19
2.Parallel arrays are two or more arrays where the data in the same element number in all arrays are related.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
20
14.The frequency distribution technique:
A)Searches sequentially through a table to find the matching values and then counts them.
B)Uses an input value to count the number of equivalent values.
C)Uses the value of an element of one array as the element number of another array and then increments the value found in that element number.
D)Uses a cross tabulation method of counting the frequency of numbers.
A)Searches sequentially through a table to find the matching values and then counts them.
B)Uses an input value to count the number of equivalent values.
C)Uses the value of an element of one array as the element number of another array and then increments the value found in that element number.
D)Uses a cross tabulation method of counting the frequency of numbers.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
21
23.The binary search
A)Starts with the first element of an array and searches each element until the correct one is found.
B)Starts with the middle element and tests to see if the number is larger or smaller that that element and continues in the same manner until the element is found.
C)Does not have to have the array in order.
D)Is another name for a sequential search.
A)Starts with the first element of an array and searches each element until the correct one is found.
B)Starts with the middle element and tests to see if the number is larger or smaller that that element and continues in the same manner until the element is found.
C)Does not have to have the array in order.
D)Is another name for a sequential search.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck
22
24.The pointer technique:
A)Points to the correct value in an array by supplying the element number.
B)Uses the value of an element in one array as the element number in another array.
C)Finds the last element in an array with a value other than zero.
D)Allows the developer to point to any element in any array given the element number.
A)Points to the correct value in an array by supplying the element number.
B)Uses the value of an element in one array as the element number in another array.
C)Finds the last element in an array with a value other than zero.
D)Allows the developer to point to any element in any array given the element number.
Unlock Deck
Unlock for access to all 22 flashcards in this deck.
Unlock Deck
k this deck