You should also arrange data types so that they slot together nicely:
The size of sizeof(s1) is 16 bytes and the sizeof(s2) is 12 bytes, because the two 2-byte short values can fit into a single 4-byte "slot".Code:struct s1 { int i; short j; int k; short l; }; struct s2 { int i; int k; short j; short l; };