Asked in
Computer Programming

What is the difference of single dimension to multi dimension array?


User Avatar
Wiki User
January 16, 2015 5:22PM

There is no practical difference. A multi-dimensional array is simply an array where every element is itself an array (an array of arrays). Fixed-size multi-dimensional arrays are always allocated contiguously just as if they were a one-dimensional array, the size of which is the product of its dimensions. Variable size arrays can also be allocated contiguously, however when they are extremely large or if the size in any one dimension is variable, it is often better to split the array into separately allocated arrays and using another array to manage each of the allocations.