ProgrammingVery hard

Which declaration makes a pointer that walks row by row through an int matrix with 6 columns?

  1. A. int *row[5];
  2. B. int **row;
  3. C. int (*row)[6];
  4. D. int row[2][6];

Correct answer: C. int (*row)[6];

int (*row)[6] points to a row of six ints. The other forms declare an array of pointers, a pointer to pointer, or an array, which are not row pointers.

More C Programming questions

Exams that ask this topic