What is the maximum number of dimensions an array in C may have?
Answer: D
Correct answer: Theoretically no limit. The only practical limits are memory size and compilers
The standard fixes no maximum number of dimensions; it only requires an implementation to support a certain depth of declarator nesting. So the limit is practical - how much memory the array would need, and how deeply the compiler will nest. Note that memory grows as the product of the bounds, so even four modest dimensions can exhaust it.
Please log in or register to report this question.