
March 20th, 2013, 04:47 AM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 3
Time spent in forums: 26 m 5 sec
Reputation Power: 0
|
|
|
Bit fields
the foll code when run on gcc compiler gave 12 as output
Code:
struct aa{char a:3;int b:30;char c:3;}; printf("%d",sizeof(struct aa));
but since sizeof int is 4 and char is 1 then why does it give 12 instead of 8 as output????
|