Why does this code work:
#include<stdio.h>
int main(){
union var{
int a, b, c;
};
printf("%ld", sizeof(union var));
return 0;
}
My doubt is that isn't union var a declaration only, and during declaration no memory is allocated. So why does this code print 4?