Vidyalelo
C Programming · Q147

Structure and Union

Programming · C Programming · question 147

Q147

What will be the output of the following C code? #include typedef struct p *q; int main() 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
Answer
B.
1
C.
Depends on the compiler
D.
None of the mentioned

Answer: Option A

Solution

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