
Chapter 8
Arrays
8.1 Introduction
An array stores multiple values of data with a single name and most program-
ming languages include facilities that support arrays. The individual values in the
array are known as elements. Many programs manipulate arrays and each one can
store a large number of values in a single collection.
To refer to an individual element of the array, an integer value or variable known
as the array index is used after the name of the array. The value of the index repre-
sents the relative position of the element in the array. Figure 8.1 shows an array with
13 elements. This array is a data structure with 13 cells, and each cell