Examveda

What will be the output of the following C code?
#include <stdio.h>
union stu
{
    int ival;
    float fval;
};
void main()
{
    union stu r;
    r.ival = 5;
    printf("%d", r.ival);
}

A. 9

B. Compile time error

C. 16

D. 5

Answer: Option D


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union