TRUE/FALSE
1. Many newer programming languages such as C++, Java, and C# use subscript 1 to access the first
element of the array.
ANS: F PTS: 1 REF: 214
2. You use subscripts 1 through 10 to access the elements in a ten element array.
ANS: F PTS: 1 REF: 214
3. Many newer programming languages such as C++, Java, and C# use the bracket notation for arrays.
ANS: T PTS: 1 REF: 214
4. Declaring a named constant makes code easier to modify and understand.
ANS: T PTS: 1 REF: 224
5. A parallel array is an array that stores another array in each element.
ANS: F PTS: 1 REF: 230
6. Parallel arrays must contain the same data type.
ANS: F PTS: 1 REF: 230
7. You can improve the efficiency of a program by leaving a loop as soon as a match is found in the
array.
ANS: T PTS: 1 REF: 234
8. Arrays cannot be used if you need to search for a range of values.
ANS: F PTS: 1 REF: 237
9. When you have a five element array and use subscript 8, your subscript is said to be out of bounds.
ANS: T PTS: 1 REF: 243
10. The for loop is a good tool when working with arrays because you frequently need to process every
element of an array from beginning to end.
ANS: T PTS: 1 REF: 244
MULTIPLE CHOICE
1. An array is a(n) ____ of values in computer memory.
a. list c. set
b. accumulation d. record
, ANS: A PTS: 1 REF: 214
2. A(n) ____ is another name for a subscript.
a. pointer c. index
b. sequence d. place holder
ANS: C PTS: 1 REF: 214
3. The number of elements in an array is called the ____ of the array.
a. width c. height
b. size d. depth
ANS: B PTS: 1 REF: 214
4. All array elements have the same group ____.
a. subscript c. memory location
b. name d. value
ANS: B PTS: 1 REF: 214
5. Array elements all have the same ____ in common.
a. pointer c. value
b. memory location d. data type
ANS: D PTS: 1 REF: 214
6. Array subscripts are always a sequence of ____.
a. large numbers c. negative values
b. characters d. integers
ANS: D PTS: 1 REF: 214
7. In all languages, subscript values must be sequential ____.
a. characters c. real numbers
b. fractions d. integers
ANS: D PTS: 1 REF: 214
8. A program contains an array that holds all the names of the days of the week. Which of the following
is true?
a. The highest subscript is 6. c. The lowest subscript is 1.
b. The highest subscript is 7. d. The highest subscript is 12.
ANS: A PTS: 1 REF: 214
9. Providing array values is sometimes called ____.
a. creating the array c. accumulating the array
b. declaring the array d. populating the array
ANS: D PTS: 1 REF: 215
10. An array can be used to replace ____.
a. records c. nested decisions
b. methods d. loops
ANS: C PTS: 1 REF: 216