# Bit twidling

Given an array of unsigned integers, print all the numbers that have more than k bits set in their binary representation. For example, if k = 2, and input array is: int arr[] = {2, 1, 15, 9, 7, 14, 32, 127}; Then the output should be: 15 7 14 127 Because all of these […]

How will you find minimum of three integers without using any comparison operator ?

Given an array of numbers find the maximum XOR value of two numbers in the array. Input Array = {12, 15, 5, 1, 7, 9, 8, 6, 10, 13}; Output = 15 (XOR of 5 and 10) 5 = 0101 10 = 1010 ——— XOR = 1111

Write a C function to compute xn which uses minimum number of multiplications. unsigned int power(double x, unsigned int n)

Given an unsigned int n, find the integer greater than or equal to n which is a power of 2. For example: Input Output —– —— 6 8 12 16 64 64