It is possible to initialize a multidimensional array during declaration time. In fact, there are multiple ways to do so. The following four ways are actually all equivalent and all initialize a 2-dimensional array with the same values:
int matrix1[NROWS][NCOLS] = {{1,2}, {3,4}, {5,6}, {7,8} };
int matrix2[NROWS][NCOLS] = { {1,2},
{3,4},
{5,6},
{7,8}};
int matrix3[][NCOLS] = {{1,2}, {3,4}, {5,6}, {7,8} };
int matrix4[][NCOLS] = {1, 2, 3, 4, 5, 6, 7, 8};
The Codecast below illustrates this further:
If you cannot see this codecast, please click here.