Question: Complete the following C function, which will return a value equal to its parameter, with the fifth least significant bit flipped off. That is, flipOffBit5(90)
Complete the following C function, which will return a value equal to its parameter, with the fifth least significant bit flipped off. That is, flipOffBit5(90) should return 74, but flipOffBit5(45) should return 45, since the fifth least significant bit is already off in 45. Do not make any assumptions about the size of an unsigned int. That is, your solution should work equally well running on an architecture where unsigned ints are 16-bit, 32-bit, or 64-bit.
unsigned int flipOffBit5 ( unsigned int x ) { return YOUR CODE HERE; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
