When we tried to update the bit its giving error for the case !!
number = 12345678
index = 5, to set the bit as 1
the answer we get is to be then again updated using this method such that:
position = 6, the bit is set to 0
Updating the Bit
@learn.cp.course
Please explain your question clearly using the bitwise representation of the number and what you’re trying to do
And if issue was with a code please send the code.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.