An array is a data structure which allows a collective name to be given to a group of elements which all have the same type. An individual element of an array is identified by its own unique index (or subscript).

An array can be thought of as a collection of numbered boxes each containing one data item. The number associated with the box is the index of the item. To access a particular item the index of the box associated with the item is used to access the appropriate box. The index must be an integer and indicates the position of the element in the array. Thus the elements of an array are ordered by the index.

#mastery24

CC BY 4.0 Arrays Mastery 24 by boshe189 is licensed under a Creative Commons Attribution 4.0 International License.