MCQ
Which of the following is a statement to declare an array named ‘m’ to store integer values in 5 rows and 3 columns?
  • A
    int m ( ) ( ) = new int [5][3];
  • int m [ ] [ ] =new int [5][3];
  • C
    int m [ ] [ ] =new int [3][5];
  • D
    None of these

Answer

Correct option: B.
int m [ ] [ ] =new int [5][3];
int m [ ] [ ] =new int [5][3];

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free