An array
is a fixed-size data structure used for storing a collection of values of a single type.
Array Declaration
To declare an
array, a set of square brackets is appended to the data type the array will contain, followed by the array’s name. Arrays can be declared with any data type, and all of its elements must then be of that type.
Alternatively, the brackets may be placed after the array name. However, this form is discouraged. Since the brackets affect the type, they should appear next to the type.
int y[]; // discouraged form
Array Allocation
The array is allocated with the ...