Which of the following is a valid declaration for a 2D array in C?

Coal India Management Trainee CBT 2026

Which of the following is a valid declaration for a 2D array in C?

  1. A.

    int a[][] = {{1,2}, {3,4}};

  2. B.

    int a[2,2] = {{1,2}, {3,4}};

  3. C.

    array a[2][2] = {{1,2}, {3,4}};

  4. D.

    int a[2][2] = {{1,2}, {3,4}};

Attempted by 335 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…