Quiz8-Arrays Flashcards
Subscripts are used to identify specific elements in an array.(T/F)
True
Unlike variables, arrays need to be initialized separately from the declaration. (T/F)
False
Array bounds checking happens at runtime. (T/F)
True
The first step when calculating the average of all values in an array is to get the sum of all the values. (T/F)
True
If an array, names, consists of a list of usernames, then names[1] holds the value of the first username in the list. (T/F)
False
Each element in a two-dimensional array has two subscripts. (T/F)
True
To calculate the total of the values in an array. a loop is used with an accumulator variable. (T/F)
True
An array, like a variable, can hold only one value. (T/F)
False
It is usually much easier to process a large number of items in an array than to process a large number of items that are stored in separate variables. (T/F)
True
The number of elements in an array is the value of the subscript of the last element in that array. (T/F)
False
One drawback to the sequential search is that it cannot be used with an array that contains string elements. (T/F)
False
The term “parallel array” is a synonym for a two-dimensional array. (T/F)
False
An individual element in an array is identified by its ____________.
subscript
A type of loop that exists in some programming languages specifically for stepping through an array and retreiving the value of each element is known as a ___________ loop.
A) Step
B) For Each
C) While Each
B) For Each
____________ arrays are two or more arrays that hold related date where each element of one array has the same subscript as a corresponding element in the other arrays.
parallel arrays