Live quiz

C Programming - Part 60

Question 1 of 25 Hints left: 3
Q1

What will be the output of the following C code? #include <stdio.h> typedef struct p *q; struct p { int x; char y; q ptr; }; int main() { struct p p = {1, 2, &p}; printf("%d\n", p.ptr->x); return 0; }

  • A
  • B
  • C
  • D