Vidyalelo
C Programming · Q159

Structure and Union

Programming · C Programming · question 159

Q159

What will be the output of the following C code? (Assuming size of char = 1, int = 4, double = 8) #include union utemp int a; double b; char c; u; int main() u.c = 'A'; u.a = 1; printf("%d", sizeof(u));

A.
1
B.
4
C.
8
Answer
D.
13

Answer: Option C

Solution

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