Implement a union that lets you view a `uint32_t` as its individual bytes, and a function `get_byte` that extracts the nth byte (0 = least significant).
typedef union {
uint32_t word;
uint8_t bytes[4];
} WordView;
Why it matters: This pattern is everywhere in embedded โ reading sensor registers, parsing CAN frames, interpreting protocol headers.
typedef union {
uint32_t word;
uint8_t bytes[4];
} WordView;
get_byte(0x12345678, 0) == 0x78get_byte(0x12345678, 3) == 0x12get_byte(0xFF000000, 3) == 0xFF