Vidyalelo
C Programming · Q176

Structure and Union

Programming · C Programming · question 176

Q176

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

A.
Compile time error
B.
Implementation dependent
Answer
C.
10.000000
D.
0.000000

Answer: Option B

Solution

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