What will be the output of the following C code?
#include <stdio.h>
union p
{
int x;
float y;
};
int main()
{
union p p, b;
p.x = 10;
printf("%f\n", p.y);
}
#include <stdio.h>
union p
{
int x;
float y;
};
int main()
{
union p p, b;
p.x = 10;
printf("%f\n", p.y);
}A. Compile time error
B. Implementation dependent
C. 10.000000
D. 0.000000
Answer: Option B

Join The Discussion