3 ms·
That's precisely how little endian works: first memory location is LSB. union { uint32_t l; uint8_t b[4]; } u = { .b = { 0x12,
by kosma 8y ago
That's precisely how little endian works: first memory location is LSB.
union {
uint32_t l;
uint8_t b[4];
} u = {
.b = { 0x12, 0x34, 0x56, 0x78 }
};
assert(u.l == 0x78563412);