C_language

Tell It by Myself…

Multidimensional Array is an advanced kind of Array, we usually use this way to declare a Multidimensional Array

type name[size1][size2]...[sizeN]

For example,

int x[3][4]

It has 3 rows and 4 columns.

And how to initialized a 2D array?

int x[3][4]={
{0,1,2,3}
{4,5,6,7}
{8,9,10,11}
}

But you can also write as

int x[3][4] = {
0,1,2,3,4,5,6,7,8,9,10,11
}

Reference