-
Bit fields memory aligment with unsigned int, short int.
I have a structure.
struct {
int a : 8;
int b : 10;
int c : 12;
int d : 4;
int e : 3;
int : 0;
int f : 1;
char g;
} A;
The size of bitfields memory is 48bits.
The size of structure should be 4+4+1 bytes = 9 bytes. What about the memory for variable g. why memory for g is not allocated separately....
C Interview Questions
Ans