← 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]?
- A.The single int at position 1
- B.Row 1, an array of 4 ints (it decays to a pointer to its first int)
- C.A pointer to the whole matrix
- 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 →