Here's you're example with some padding to show what happens when b and c are interchanged.
struct aa {
char a:3; // bits 0..2 of char
char c:2; // bits 3..4 of same char
char unused:3 // most significant 3 bits of the same char
char pad[3]; // pad to 4 byte boundary
int b:30; // bits 0..29 of int
};
This would give a size of 8 bytes.
Unfortunately, I don't have a gcc compiler with me at the moment to explain why the following would also produce a size of 8.
Dear Friends, I am facing a problem, I have two forms,
Form1 Has one DataGrideview and Button redirect to Form2, which has Button(Browse Excel File) and combobox(Sheet No of excel ...