ProgrammingModerate

char names[3][6] = {"ab", "cde"}; What is sizeof names[1]?

  1. A. 3
  2. B. 4
  3. C. 18
  4. D. 6

Correct answer: D. 6

names[1] is one row of six chars, so it has 6 bytes regardless of the string stored in it.

More C Programming questions

Exams that ask this topic