Vidyalelo
C Programming · Q90

Structure and Union

Programming · C Programming · question 90

Q90

What will be the output of the following C code? #include union int x; char y; p; int main() p.y = 60; printf("%d ", sizeof(p));

A.
Compile time error
B.
sizeof(int) + sizeof(char)
C.
Depends on the compiler
Answer
D.
sizeof(char)

Answer: Option C

Solution

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