Getting Started With C

Multi-dimensional array

Multi-Dimensional Arrays

Program.c

Output:
1 2 3 4
5 6 7 8
9 10 11 12

13 14 15 16
17 18 19 20
21 22 23 24

  • In this example, int cube[2][3][4] declares a 3D array with dimensions 2x3x4, and the nested loops iterate over each element, printing its value.
  • Resources :

    Test Your Knowledge
    Choose The

    With supporting text below as a natural lead-in to additional content.

    Q1. Choose a correct statement about a C Multidimensional array.

    Q2. A multidimensional array of dimension N is a collection of.?