ISO / IEC 9899: 2011 - C
In C, the C11 standard requires:
5.2.4.1 Translation restrictions
An implementation must be able to translate and execute at least one program that contains at least one instance of each of the following limits: 18)
...
12 pointers of pointer, array, and functions (in any combination) that change arithmetic, structure, union, or void type an declaration.
...
18) Implementations should avoid introducing fixed translation restrictions when possible.
This means that it must be a standard compiler, it must allow at least 12 dimensions of the array per simple type, for example int , but should not impose any restrictions, if at all possible. Standards C90 and C99 also require the same limit.
ISO / IEC 14882: 2011 - C ++
For C ++ 11 equivalent information:
Appendix B (informative) Scope of implementation [implimits]
Because computers are finite, C ++ implementations are inevitably limited in the size of the programs that they can successfully process. Each implementation should document the limitations that are known. This documentation may indicate fixed limits where they exist, say how to calculate variable limits as a function of available resources, or say that fixed limits do not exist or are unknown.
2 Limits may limit quantities that include those described below or others. The number in parentheses after each quantity is recommended for at least that quantity. However, these values ββare only recommendations and do not determine compliance.
...
Pointers, arrays, and functions (in any combination) that change the class, arithmetic, or incomplete type declaration [256].
...
Thus, in C ++, it is recommended that you can use at least 256 dimensions in an array declaration.
Note that even after you get the compiler to accept your code, there will eventually be restrictions on the memory of the machine where the code is executed. Standards determine the minimum number of dimensions that the compiler must allow (override in the C ++ standard, the mind is afraid when thinking about a 256-dimensional array). The goal is that you do not run into a problem - use as many dimensions as you need. (Can you imagine working with the source code for a 64-dimensional array, not to mention anything else - individual expressions in the source will be terrible, and not write, read, modify.)