Welcome to MindCipher, a social repository of the world's greatest brain teasers, logic puzzles and mental challenges.

Filtered by tag: powers

3 4 Power of 2 (Microsoft Interview)
Given any number n, using one line of C (using no external libraries or functions) code, determine if n is a power of 2. Return 1 if n is a power of 2 and 0 if not.
bitwise powers Submitted by Aakash