An array is a linear data structure that stores a collection of elements of the same data type in contiguous memory locations. Each element in the array is identified by at least one index or key. Because the elements are stored side-by-side in memory, arrays offer very efficient random access; any element can be accessed directly using its index.