Unions allow different types to share the same memory. This is extremely helpful in firmware where byte-wise access to multibyte registers is needed — for UART framing, CRC, SPI/I2C transmission, etc.
Solution Logic:
Define a union with uint32_t and uint8_t[4]
Assign to the value field
Access individual bytes via bytes[] (LSB is bytes[0] in little-endian systems)