union u
{
union u
{
int i;
int j;
}a[10];
int b[10];
}u;
main()
{
printf("n%d", sizeof(u));
printf(" %d", sizeof(u.a));
printf("%d", sizeof(u.a[4].i));
}
Hello People. I just came across this piece of C code. I have a couple of question
The third printf statement gives me the following error
pollux {~} > gcc test.c -o test
test.c: In function `main':
test.c:21: error: union has no member named `i'
pollux {~} >
I cannot understand the reason for this. Can some one shed some light on this ?