Possible Duplicate:
Why double in C is 8 bytes aligned?
structure s{
char a;
double b;
int c;
}d;
the sizeof d is 24.As it comes out to be double is aligned to 8 byte boundary.Can anybody explain why it is aligned to 8 byte boundary and not 4 byte boundary.I read somehwre that all elements are aligned to there size ? Why is it so