Given an unsigned integer, swap all odd bits with even bits. For example, if the given number is 23 (00010111), it should be converted to 43 (00101011).
odd or even program in c
4 Articles
4
Given an unsigned integer, swap all odd bits with even bits. For example, if the given number is 23 (00010111), it should be converted to 43 (00101011).
Write a C program to find parity of an unsigned integer – Bit Algorithm – Parity of a number refers to whether it contains an odd or even number of 1-bit
C Programming – Check divisibility by 7 – Mathematical Algorithms – Divisibility by 7 can be checked by a recursive method. A number of the form 10a + b.