C/C++ Syntax Reference - Declaring Arrays
Declaring an ArrayAn array declaration requires the base type (the type that each element of the array will be -- .e.g., char or int), the name of the array, and the size of the array in square braces:
type name[size];For instance,
int myArray;declares an array of integers of size 10.
It is also possible to declare arrays with more than one dimension by the use of multiple square brackets, one for each dimension. A concrete example is declaring a 2-dimensional array: