It was a grandeur party. In order to filter the uninvited guests, the security guard was assigned a task to check the secret password. The guests invited by the royal family also were shared with the secret password.
John wasn't an invited guest. He learned that the password is needed to make an entry. He hides himself and started watching the guests and the security.
The first guest comes. Security told him, TWELVE and the guest replied SIX. He wished him and allowed him to enter.
The second guest comes. Security told him SIX and the guest replied THREE! He was too allowed.
John made an entry as third guest. Security told him EIGHT and John replied FOUR. He was thrown out of the party!
Why?

The answer should be five. The password is not half of the digit, but the number that represents the number of digits told by security.

You are standing before two doors. One of the path leads to heaven and the other one leads to hell. There are two guardians, one by each door. You know one of them always tells the truth and the other always lies, but you don’t know who is the honest one and who is the liar. You can only ask one question to one of them in order to find the way to heaven. What is the question?

The question you should ask is "If I ask the other guard about which side leads to heaven, what would he answer?"
It should be fairly easy to see that irrespective of whom do you ask this question, you will always get an answer which leads to hell. So you can chose the other path to continue your journey to heaven.
This idea was famously used in the 1986 film Labyrinth.
Here is the explanation if it is yet not clear.
Let us assume that the left door leads to heaven.
If you ask the guard which speaks truth about which path leads to heaven, as he speaks always the truth, he would say "left". Now that the liar , when he is asked what "the other guard (truth teller) " would answer, he would definitely say "right".
Similarly, if you ask the liar about which path leads to heaven, he would say "right". As the truth teller speaks nothing but the truth, he would say "right" when he is asked what "the other guard( liar ) " would answer. So in any case, you would end up having the path to hell as an answer. So you can chose the other path as a way to heaven.

Every day, Jack arrives at the train station from work at 5 pm. His wife leaves home in her car to meet him there at exactly 5 pm, and drives him home. One day, Jack gets to the station an hour early, and starts walking home, until his wife meets him on the road. They get home 30 minutes earlier than usual. How long was he walking? Distances are unspecified. Speeds are unspecified, but constant. Give a number which represents the answer in minutes.

The best way to think about this problem is to consider it from the perspective of the wife. Her round trip was decreased by 30 minutes, which means each leg of her trip was decreased by 15 minutes. Jack must have been walking for 45 minutes.

How much dirt would be in a hole 6 feet deep and 6 feet wide that has been dug with a square edged shovel?

None.
No matter how big a hole is, it's still a hole: the absence of dirt.
And those of you who said 36 cubic feet are wrong for another reason, too.
You would have needed the length measurement too.
So you don't even know how much air is in the hole.

There are 3 switches outside of a room, all in the 'off' setting. One of them controls a lightbulb inside the room, the other two do nothing.
You cannot see into the room, and once you open the door to the room, you cannot flip any of the switches any more.
Before going into the room, how would you flip the switches in order to be able to tell which switch controls the light bulb?

Flip the first switch and keep it flipped for five minutes. Then unflip it, and flip the second switch. Go into the room. If the lightbulb is off but warm, the first switch controls it. If the light is on, the second switch controls it. If the light is off and cool, the third switch controls it.

How to measure exactly 4 gallon of water from 3 gallon and 5 gallon jars, given, you have unlimited water supply from a running tap.

Step 1. Fill 3 gallon jar with water. ( 5p – 0, 3p – 3)
Step 2. Pour all its water into 5 gallon jar. (5p – 3, 3p – 0)
Step 3. Fill 3 gallon jar again. ( 5p – 3, 3p – 3)
Step 4. Pour its water into 5 gallon jar untill it is full. Now you will have exactly 1 gallon water remaining in 3 gallon jar. (5p – 5, 3p – 1)
Step 5. Empty 5 gallon jar, pour 1 gallon water from 3 gallon jar into it. Now 5 gallon jar has exactly 1 gallon of water. (5p – 1, 3p – 0)
Step 6. Fill 3 gallon jar again and pour all its water into 5 gallon jar, thus 5 gallon jar will have exactly 4 gallon of water. (5p – 4, 3p – 0)