ProgrammingModerate

char name[] = "Bob"; char *p = name; printf("%c%c", p[0], *(p + 2)); What is printed?

  1. A. Bo
  2. B. Ob
  3. C. Bb
  4. D. Bob

Correct answer: C. Bb

p[0] is B and *(p + 2) is the last letter b, so the output is Bb.

More C Programming questions

Exams that ask this topic