Arrays in C/C++

C++ provides a data structure, the array, which stores a fixed-size, sequential collection of elements of the same type. They are used to store similar types of elements. (The data type must be the same for all elements.) They can be used to store collections of primitive data types, such as int, float, double, char, etc. of any particular type. To add to it, an array in C or C++ can store derived data types, such as structures, pointers etc.

All arrays consist of contiguous memory locations. The lowest address corresponds to the first element, and the highest address to the last element.