ProgrammingModerate

char *p = "abc"; printf("%d", *(p + 3)); What is printed?

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

Correct answer: A. 0

p + 3 points at the terminator of the literal, whose value is 0. Reading it is defined.

More C Programming questions

Exams that ask this topic