ProgrammingModerateTCS NQT · Infosys

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

  1. A. a
  2. B. b
  3. C. c
  4. D. abc

Correct answer: B. b

"abc" + 1 decays to a pointer to the second character, so *p is 'b'.

More C Programming questions

Exams that ask this topic