what is 1U-1 in the code please explain
if there is another approach give that/…
Https://www.geeksforgeeks.org/swap-bits-in-a-given-number/
i have doubt int he first method what is 1U-1 here
1U is an unsigned value with the single bit 0 set, and all the other bits cleared. The << operator means “shift to the left”. 1U << 0 means create a value with bit 0 set; 1U << 1 means create a value with bit 1 set
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.