Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

C Multidimensional Arrays (2D, 3D 이해하기)

  • To create a 2D array of integers
int matrix[2][3] = { {1, 4, 2}, {3, 6, 8} };

2D matrix


C code
2D matrix
Column 0 Column 1 Column 2
Row 0 1 4 2
Row 1 3 6 8
  • Access the Elements of a 2D Array
int matrix[2][3] = { {1,4,2}, {3,6,8}};

printf("%d", matrix[0][2]);  // Outputs 2

https://www.w3schools.com/c/c_arrays_multi.php