在多维数组中,数组的维数应该大于1。下图展示了一个维数为3 x 3 x 3的多维数组的内存分配策略。

这是一个用C++编写的初始化多维数组的程序。
算法
Begin Initialize the elements of a multidimensional array. Print the size of the array. Display the content of the array. End
示例
#includeusing namespace std; int main() { int r, c; int a[][2] = {{3,1},{7,6}}; cout<< "Size of the Array:"< 输出
Size of the Array:16 Content of the Array:16 3 1 7 6











