Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Essentially an array of arrays, representing data in a grid or table format with rows and columns.
int matrix[3][4]; // 3 rows, 4 columnsint grid[2][2] = {
{1, 2},
{3, 4}
};Use two indices: matrix[row][col]
int val = grid[1][0]; // Access row 1, col 0 (value 3)2D arrays are widely used in game development (tile maps), image processing (pixels), and dynamic programming (memoization tables).