Employee records stored in order from highest-paid to lowest-paid have been sorted in ____ order.
A. descending
Student records stored in alphabetical order by last name have been sorted in _____ order.
B. ascending
When computers sort data, they always ______.
C. use numeric values when making comparisons
Which of the following code segments correctly swaps the values of variables named x and y?
A. x = y
y = temp
x = temp
B. temp = x
x = y
y = temp
C. x = y
temp = x
y = temp
D. temp = x
y = x
x = temp
B. temp = x
x = y
y = temp
Which type of sort compares list items in pairs, swapping any two adjacent values that are out of order?
B. bubble sort
To sort a list of 15 values using a bubble sort, the greatest number of times you would have to pass through the list making comparisons is ____.
A. 14
To completely sort a list of 10 values using a bubble sort, the greatest possible number of required pair comparisons is ____.
B. 81
When you do not know many items need to be sorted in a program, you can create an array that has _____.
D. at least as many elements as the number you predict you will need
In a bubble sort, on each pass through the list that must be sorted, you can stop making pair comparisons _____.
B. one comparison sooner
When performing a bubble sort on a list of 10 values, you can stop making passes through the list of values as soon as ____ on a single pass through the list.
C. no swaps are made
The bubble sort is ________.
C. a relatively easy sort to understand
Data stored in a table that can be accessed using row and column numbers is stored as a ______ array.
D. two-dimensional
A two-dimensional array declared as num myArray [6] [7] has _____ columns.
D. 7
In a two-dimensional array declared as num myArray [6] [7], the highest row number is ____.
D. 5
If you access a two-dimensional array with the expression output myArray [2] [5], the output value will be _____.
B. impossible to tell from the information given
Three-dimensional arrays ______.
A. are supported in many modern programming languages
Student records are stored in ID number order, but accessed by grade-point average for a report. Grade-point average order is a(n) ______ order.
B. logical
When you store a list of key fields paired with the storage address for the corresponding data record, you are creating _____.
B. an index
When a record in an indexed file is not needed for further processing, _______.
D. the record can stay in place physically, but its reference is removed from the index
With a linked list, every record ______.
A. contains a field that holds the address of another record