Examveda

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);
}

A. Compile time error

B. Implementation dependent

C. 10.000000

D. 0.000000

Answer: Option B


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union