ProgrammingHard

struct R { int v; struct R *next; }; struct R c = {3, NULL}, b = {2, &c}, a = {1, &b}; printf("%d", a.next->next->v); What is printed?

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

Correct answer: C. 3

a.next is b and b.next is c, so a.next->next->v is c.v, which is 3.

More C Programming questions

Exams that ask this topic