QP School

Full Version: Multi-dimensional arrays in C
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Multi-dimensional arrays are arrays of arrays.

int matrix[3][3] = {
    {1, 2, 3},
    {4, 5, 6},
    {7, 8, 9}
};
printf("%d\n", matrix[1][2]); // Output: 6