Multiple choice

Which of the following statements regarding arrays is incorrect?

  1. Arrays can be used to determine control flow in programs.

  2. Arrays are also used to implement other data structures.

  3. Two-dimensional arrays are also called matrices.

  4. The element indices of arrays cannot be computed at run time.

  5. An index maps the array value to a stored object.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Arrays are useful mostly because the element indices can be computed at run time. Among other things, this feature allows a single iterative statement to process arbitrarily many elements of an array. For that reason, the elements of an array data structure are required to have the same size and should use the same data representation.