Examveda

What will be the output of the following C code?
#include <stdio.h>
union p
{
    int x;
    char y;
}k = {1, 97};
int main()
{
    printf("%d\n", k.y);
}

A. Compile time error

B. 97

C. a

D. 1

Answer: Option D


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union