Multi-Diemensional Arrays

Declaration

Two-dimensional arrays

int a[row_size][col_size] is the declaration.
Example: int table[2][4] = { {1,2,3,4},{5,6,7,8};

2D arrays can also be dynamically-allocated.

Multi-dimensional Arrays and Functions

When specifying multi-dimensional arrays as function parameters, you do not need to specify the first array size, but the second and following dimensions must be given.

void sum_matrix(int list[][4], int numRows);