Question: Write a function, unsigned int revbits(unsigned int) in revbits.c, that takes as argument an integer of type unsigned int, inspects its bits, reverses the ordering
Write a function, unsigned int revbits(unsigned int) in revbits.c, that takes as argument an integer of type unsigned int, inspects its bits, reverses the ordering of the bits (e.g., the least significant bit becomes the most significant bit), then returns an unsigned int that is the unsigned integer value of the reversed bits. Use main() and allb() to verify that revbits() works correctly.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
