Swap All Odd And Even Bits
1. You are given a number n. 2. You have to swap all odd position bits with even position bits. 3. Every odd position bit is swapped with adjacent bit on left side. 4. Every even position bit is swapped with adjacent bit on right side. 5. Print the number formed after swapping.
1 <= n <= 10^9
A number n
Check the sample ouput and question video.