#include typedef struct { double d; char c; } CS; typedef struct { char c1; double d; char c2; } CS1; main() { CS a; CS1 b; printf("sizeof(CS)=%d\n", sizeof(CS)); printf("offset(a.d)=%d, offset(a.c)=%d\n", (int)((char *)&a.d - (char *)&a), (int)((char *)&a.c - (char *)&a)); printf( "sizeof(CS1)=%d\n", sizeof(CS1)); printf( "offset(b.c1)=%d, offset(b.d)=%d, offset(b.c2)=%d\n", (int)((char *)&b.c1 - (char *)&b), (int)((char *)&b.d - (char *)&b), (int)((char *)&b.c2 - (char *)&b)); }