Write a program to swap odd and even bits in an integer


Write a program to swap odd and even bits in an integer with as few instructions as possible (e g , bit 0 and bit 1 are swapped, bit 2 and bit 3 are swapped, etc)

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a program to swap odd and even bits in an integer
Reference No:- TGS01392312

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)