How do you declare a two-dimensional array of integers with 3 rows and 4 columns?

  • int arr[12];
  • int arr[3][4];
  • int arr[4][3];
  • int arr[][];
To declare a 2D array in C with 3 rows and 4 columns, you use the syntax: int arr[3][4]; The first dimension specifies the number of rows, and the second dimension specifies the number of columns.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *