Swap all the pair of bits in a byte.
Before swapping: 11-10-11-01
After swapping: 11-01-11-10
The first line of the input contains an integer T denoting the number of test cases. Each test case contains an unsigned integer x.
For each test case, the output is the integer after swapping the bits.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.