← Quiz: Pointers and 2D Arrays: all 15 questions
Quiz: Pointers and 2D Arrays · Question 5 of 15
Which function header can receive int marks[10][6]?
Which function header can receive int marks[10][6]?
- A.void f(int m[][])
- B.void f(int m[][6], int rows)
- C.void f(int m[10][])
- D.void f(int *m[6])
Answer & explanation
Correct answer: void f(int m[][6], int rows)
Every dimension except the first must be given so the compiler can compute m[i][j]. int *m[6] would be an array of pointers, a different type.
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 →