Problem Given four binary digits all ones 1111 and two binary digits all zeros 00 we need to create a six digit binary number using these ones and zeros such that no two zeros are next to each other. How …

# Tag Archives: Bitwise

## Bitwise operators in c++

Posted by admin
on August 17, 2010
No comments

Problem Write a C++ function that takes a character as input and returns true if the second significant bit of the binary representation of the character is set (i.e equals to 1) otherwise return false. Solution This is a bitwise …

## Swap variables interview question

Posted by admin
on May 18, 2010
No comments

Swapping two variables without a temp Given two integer variables A and B. Write C++ code to swap them without using a temporary variable. Solution This is a well known problem for which you can find so many references on …