1.

What will be the output of the following C code?
#include <stdio.h>
union Un
{
struct
{
unsigned char c : 1;
unsigned int n : 2;
}Stru;
int ch;
};
int main()
{
union Un u;
u.Stru.c = 1;
printf("%d n", u.Stru.c);
}

A. 0
B. 1
C. 2
D. Garbage value
E. Compilation Error
Answer» C. 2


Discussion

No Comment Found

Related MCQs