Posts Tagged ‘Medium’

C# programming skills? Test them!

Posted on July 7th, 2009 by Sandeep in Puzzle

int main()
{
      int i, n = 20;
      for (i = 0; i < n; i–)
           printf(“*”);
      return 0;
}
Change OR add only one character and print ‘*’ exactly 20 times.
There are atleast 3 solutions to this problem :-)

Three light bulbs and three switches. Identify each switch with its bulb!

Posted on June 12th, 2009 by Sandeep in Puzzle

There is a room with a door (closed) and three light bulbs (initially switched off). Outside the room there are three switches, connected to the bulbs. You may manipulate the switches as you wish, but once you open the door you can’t change them. Identify each switch with its bulb.

Switches : S1,S2 and S3
Bulbs : B1, B2 and B3

Guess the correct answer!

Posted on June 12th, 2009 by Sandeep in Puzzle

Here are three answers:

1. Answer A
2. Answer A or B
3. Answer B or C

There is only one correct answer to this question. Which answer is it?

The river crossing puzzle

Posted on June 9th, 2009 by Sandeep in Puzzle

Five men and five boys have to cross the Ganga River to attend a birthday party. They have only one row boat with them. Because of the small size of the row boat, the boat can not carry more than one man, or more than two boys. Thus, a man riding with a boy would not be possible. What would be the least number of boat trips that would take everyone to the other shore?

The Most Intelligent Prince

Posted on June 8th, 2009 by Sandeep in Puzzle

A king wants his daughter to marry the smartest of 3 extremely intelligent young princes, and so the king’s wise men devised an intelligence test.

The princes are gathered into a room and seated, facing one another, and are shown 2 black hats and 3 white hats. They are blindfolded, and 1 hat is placed on each of their heads, with the remaining hats hidden in a different room.

The king tells them that the first prince to deduce the color of his hat without removing it or looking at it will marry his daughter. A wrong guess will mean death. The blindfolds are then removed.

You are one of the princes. You see 2 white hats on the other prince’s heads. After some time you realize that the other prince’s are unable to deduce the color of their hat, or are unwilling to guess. What color is your hat?

Note: You know that your competitors are very intelligent and want nothing more than to marry the princess. You also know that the king is a man of his word, and he has said that the test is a fair test of intelligence and bravery.