🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Pointers and 2D Arrays: all 15 questions

Quiz: Pointers and 2D Arrays · Question 13 of 15

For int m[3][4];, what is m[1]?

For int m[3][4];, what is m[1]?

  1. A.The single int at position 1
  2. B.Row 1, an array of 4 ints (it decays to a pointer to its first int)
  3. C.A pointer to the whole matrix
  4. D.Column 1 of the matrix
Answer & explanation

Correct answer: Row 1, an array of 4 ints (it decays to a pointer to its first int)

Indexing once picks a row; indexing again picks an element in that row.

Can you get the rest right without peeking?

Take the timed Quiz: Pointers and 2D Arrays quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →