pointers-memory · intermediate · ~15 min
Bitwise shifts and masking.
Implement uint32_t reverse_bits(uint32_t n) returning n with its 32 bits in reversed order.
#include <stdint.h>
uint32_t reverse_bits(uint32_t n) { /* TODO */ return 0; }
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.