Hello People... I found this sample code online
int main(int argc, char* argv[])
{
struct bitfield
{
signed int a:3;
unsigned int b:13;
unsigned int c:1;
};
struct bitfield bit1={2,14,1};
printf("%d",sizeof(bit1));
return 1;
}
I compiled this code on linux with gcc compiler and the output I got for this is 4. Can any one explain why this so ?