
Write a function that exchanges the upper nibble and the lower nibble of a byte and returns the result.
swap_bits(0xF0)Expected result
15For your own tracking. Tests grade your code.
swap_bits(0xAB)Expected result
186Expected files
swap_bits.cAllowed functions
None. Write every helper yourself.

v0.40: Create exercises. Challenge the community.
Meet Studio →Write a function that exchanges the upper nibble and the lower nibble of a byte and returns the result.
swap_bits(0xF0)Expected result
15For your own tracking. Tests grade your code.
swap_bits(0xAB)Expected result
186Expected files
swap_bits.cAllowed functions
None. Write every helper yourself.

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.