Examveda

What will be the output of the following C code? (Assuming size of char = 1, int = 4, double = 8)
#include <stdio.h>
union utemp
{
    int a;
    double b;
    char c;
}u;
int main()
{
    u.c = 'A';
    u.a = 1;
    printf("%d", sizeof(u));
}

A. 1

B. 4

C. 8

D. 13

Answer: Option C


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union