ProgrammingModerate

char *names[] = {"ab", "cde"}; printf("%zu", sizeof names / sizeof names[0]); What is printed?

  1. A. 5
  2. B. 3
  3. C. 2
  4. D. 1

Correct answer: C. 2

names is an array of two pointers, so the division gives 2, the number of elements.

More C Programming questions

Exams that ask this topic