19 lines · c
1#include <stdint.h>2 3union S4{5 int32_t n; // occupies 4 bytes6 uint16_t s[2]; // occupies 4 bytes7 uint8_t c; // occupies 1 byte8}; // the whole union occupies 4 bytes9 10int main()11{12 union S u;13 14 u.s[0] = 1234;15 u.s[1] = 4321;16 17 return 0; // Break here18}19