Vidyalelo
C Programming · Q160

Structure and Union

Programming · C Programming · question 160

Q160

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

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

Answer: Option D

Solution

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