Write a C function which does the addition of two integers without using the '+' operator. You can use only the bitwise operators.(Remember the good old method of implementing the full-adder circuit using the or, and, xor gates....)...
Three people check into a hotel. They pay £30 to the manager and go to their room. The manager suddenly remembers that the room rate is £25 and gives £5 to the bellboy to return to the people. On the way to the room the bellboy reasons that £5 would be difficult to share among three people so he pockets £2 and gives £1 to each person. Now each person paid £10 and got back £1. So they paid £9 each, totalling £27. The bellboy has £2, totalling £29. Where is the missing ...
Here is snippet of section D of the curious multiple-choice entrance exam into the exclusive Brain Bashers puzzleQ1. Which is the first question where c) is the correct answer a) Q3b) Q4c) Q1d) Q2 Q2. Which is the first question where a) is the correct answer a) Q4b) Q2c) Q3d) Q1 Q3. Which is the first question where d) is the correct answer a) Q1b) Q2c) Q4d) Q3 Q4. Which is the first question where b) is the correct answer a) Q2b) Q4c) Q3d) Q1...
There are 5 houses in 5 different colours. In each house lives a person of a different nationality. The 5 owners drink a certain type of beverage, smoke a certain brand of cigar, and keep a certain pet. Using the clues below can you determine who owns the fish? The Brit lives in a red house.The Swede keeps dogs as pets.The Dane drinks tea.The green house is on the immediate left of the white house.The green house owner drinks coffee.The person who smokes Pall Mall rears birds.The owner of the yellow house smokes Dunhill.The man living in the house right in the middle drinks milk.The Norwegian lives in the first house.The man who smokes Blend lives next door to the one who keeps cats.The man who keeps horses lives next door to the man who smokes Dunhill.The owner who smokes Blue Master drinks...
There are five houses. Each house has its own unique color. All house owners are of different nationalities. They all have different pets. They all drink different drinks. They all smoke different cigarettes. The English man lives in the red house. The Swede has a dog. The Dane drinks tea. The green house is on the left side of the white house. They drink coffee in the green house. The man who smokes Pall Mall has birds. In the yellow house they smoke Dunhill. In the middle house they drink milk. The Norwegian lives in the first house. The man who smokes Blend lives in the house next to the house with cats. In the house next to the house where they have a horse, they smoke Dunhill. The man who smokes Blue Master drinks beer. The German smokes Prince. The Norwegian lives...
With how few assistants can an intrepid explorer make a 6 day crossing on foot of an absolutely barren desert, if he and the available assistants can each carry only enough food and water to last one man four days? Look for the simplest humane soln...
A drinks machine offers three selections - Tea, Coffee or Random (Either tea or Coffee)but the machine has been wired up wrongly so that each button does not give what it claims. If each drink costs 50p, how much minimum money do you have to put into themachine to find out which button gives which selecti...
In 1 Rupee you can get 20 Chimneys, 1 Rupee you can get 1 Bulbul, 5 Rs you can get 1 Eagle, Get 100 birds in 100 Rs. Use all birds....what are the number of each type of birds?...
Hari (H), Gita (G), Irfan (I) and Saira (S) are siblings (i.e. brothers and sisters). All were born on 1st January. The age difference between any two successive siblings (that is born one after another) is less than 3 years. Given the following facts:1. Hari's age + Gita's age > Irfan's age + Saira's age2. The age difference between Gita and Saira is 1 year. However, Gita is not the oldest and Saira is not the youngest.3. There are no twins.In what order were they born (oldest first) ??...
1000 wine bottles stack 10 are poisoned given 10 rats what is the minimum number of tries to find the poisoned one. Rat dies once it licks the poisoned wi...
Tina & Meena are twins. One of them lies while the other is truthful. I asked one of them, "Does Tina lie?" "Yes", was the answer.Did I speak to Tina or Meena?...
How many people are living in TibetWith the help of following data can you findHow many people were listed as living in Tibet?The population of some countries is calculated based upon some logic and listed here:-USA 130,000England 410,000France 340,000Peru 200,000Brazil 340,000Greece 300,000Japan 270,000...
A light bulb is hanging in the first floor of the room. There are three switches in the ground floor room. One of these switches belongs to that light bulb. The light bulb is not lit and the switches are in off state. There is only one chance to visit the room. How can it be determined which of these switch is connected to the light bulb....
A block of wood in rectangular form that is 4cm x 10cm x 11cm all surfaces of pink rose color. If the block of wood is cut into 440 cubes of 1cm × 1cm x 1cm each, how many cubes would have color pink rose?...
Mr. Hari, his wife, his son, his mother, among these people one of them is a Lawyer, and the other is Doctora) If lawyer is younger than the Doctor, then they dont have blood relationsb) If lawyer is a women, then Doctor and lawyer have the blood realationsc) If Doctor is man, then lawyer is also a man.Who is doctor, who is lawyer?...
Three of these statements are untrue,Mr Red: "Mr Blue did it."Mr Blue: "Mr Red did it."Mr Green: "Mr Blue's telling the truth."Mr Yellow: "Mr Green's not lying Do you know who did it??...
Rusty's Montana cabin is almost buried in snow, and the temperature is 25 below zero. Rusty's eyes move from the single match he has in his hand to a candle, an oil lamp and a fireplace with kindling all ready to be lit. Which does he light first?...
There is a man dead in a locked office, sitting at his desk. On the desk there are a couple of pieces of blank paper, a pen and a sealed envelope. The office is locked from the inside. No-one has directly killed him. How was he kill...
You are having $302 with you. Divide $302 (in whole $ increments) into a number of bags so that I can ask for any amount between $1 and $302, and you can give me the proper amount by giving me a certain number of these bags without opening them. What is the minimum number of bags you will requi...
On October 2, 2001, the date in MMDDYYYY format was a palindrome (sameforwards as backwards).That is 10/02/2001. When was the last date that this occurred on before year 20...
A man had covered 2/3 of distance by cycling and remaining covered on feet. For this he took twice the time to the cycling. Find how much speed is greater for cycling than on fe...
A soldier has been captured by the enemy and is sentenced to die. His captors say: "You may make a statement. If you tell a lie, you will be shot. If you tell the truth, you will be hanged." He makes a statement and goes free. What could he have sa...
Many years from now, two classmates met in a street. The following is part of their discussion.Student 1: Yes, I'm married and have three wounderful children.Student 2: That's great! How old are they?Student 1: Well, the product of their ages is 36.Student 2: Hmm. That doesn't tell me enough. Give me another clue.Student 1: OK. the sum of their ages is the number on that building across the street.Student 2: (After a few minutes of thinking with the aid of pencil and paper) Ah ha! I've almost got it but I still need another clue.Student 1: Very well. The oldest one has red hair.Student 2: I've got it!What were the ages of the children of student...
In a hotel, rooms are numbered from 101 to 550. A room is chosen at random. What is the probability that room number starts with 1, 2 or 3 and ends with 4, 5 or...
If you take a marker and start from a corner on a cube, what is the maximum number of edges you can trace across if you never trace across the same edge twice, never remove the marker from the cube, and never trace anywhere on the cube, except for the corners & edges?...