An array of one dimension is a block, or contiguous grouping, of a specified data type accessed via a basename; each element is then accessed via an offset of that basename.
A one-dimensional array may be called a vectorin some domains, while in others it may be referred to as alinear array. To review what we covered in the last chapter, we will use a one-dimensional array as the basis for our discussion, as follows:
int array1D[5] = { 1 , 2 , 3 , 4 , 5 };
Here, array1D has five integers, initialized to the values of 1 through 5 for the values at the zeroth through fourth offsets. array1D is a block of five integers; they are contiguous (or side-by-side) so that the block takes up 5 * sizeof(int) bytes of memory. The array has five elements, with offsets from the base to each element in the range of 0..4. This linear array can be represented vertically, as follows:
Alternatively, it...