ProgrammingHard

printf("%zu", strlen("\\n")); What is printed?

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

Correct answer: C. 2

"\\n" is a backslash followed by the letter n, so it has two characters and no newline.

More C Programming questions

Exams that ask this topic