Vidyalelo
C Programming · Q37

Structure and Union

Programming · C Programming · question 37

Q37

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

A.
Compile time error
B.
1
Answer
C.
Depends on the compiler
D.
Depends on the standard

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board