Vous êtes sur la page 1sur 7

Logical Reasoning-1 1)Fill in the blanks SCD,TEF,UGH,_____ ,WKL a)CMN b)UJI Answer : VIJ

c)VIJ

d)IJT

2)Problem Statement There are seven liquid bottles out of which one contains a poison. You have to find out which bottle contains poison within half an hour. You can make use of any no.of. rats to drink any no.of bottles to find out the bottle containing poison. A rat would take half hour to die. Find out an optimum solution to find out the bottle containing Poison ( meaning : find the minimum no. Of rats which would be needed to find out the bottle containing poison.) Eg: A worst case example can make use of 7 rats drinking from each bottle .After half an hour, a rat would die. So you can easily spot out the bottle containing poison as the rat had died because of that bottle. Answer Minimum :3 rats Rat 1 { 1,2,3,5} Rat 2 {1,2,4,6} Rat 3 {1,3,4} All 3 rats dies means, poison is in bottle 1 If R1 & R2 dies means, poison is in bottle 2 If R1& R3 dies means, poison is in bottle 3 If R2 & R3 dies means, poison is in bottle 4 If R1 alone dies means, poison is in bottle 5 If R2 alone dies means, poison is in bottle 6 If none of the rats die, poison is in bottle 7 << you can have other answers too >>

3) Four intelligent criminals are to be punished. The judge allows them to be freed if they solve a puzzle. Only one criminal should answer it, if there is wrong all 4 would be hanged. The four criminals are made to stand facing one direction with a wall separating the 4 th person from the other 3 as shown in figure.

To summarise; Man 1 can see Man 2 and Man 3 Man 2 can see Man 3 Man 3 and Man 4 cannot see any one. The Puzzle : The Judge has 4 hats ( 2 black and 2 white ). He would randomly put the hats on to each criminals head. No criminal can see the color of the hat which he wears. Now the judge asks any one of the criminals to shout the color of their hat. (Only 1 must shout ; if it is wrong all 4 would be sentenced to death) No criminals are allowed to turn back or talk or gesture. They are not allowed to take their hats off The Question : Which criminal would shout and why ? 4)A bus runs at 100kmph top speed with maximum 6 passengers. If speed of bus decreases with increase in number of passengers, find out the speed of the bus with 3 passengers? Answer : 100kmph ( because 100 kmph is top speed) 5) There are 25 horses and 5 tracks in a race. How do you find the second coming horse of all 25 horses, provided there is no stop clock. Also find out the minimum no.of races needed to find out the second coming horse. Solution: Divide the set of 25 horses into 5 non-overlapping sets of 5 horses each. Have a race each for all the horses in each set. This makes it a total of 5 races, one for each set. Now, have a race for the winners of each of the previous 5 races. This makes it a total of 6 races. Observe the position of each horse in the 6th race and correspondingly number the sets. i.e. the set of the winner

of 6th race will be said to be set no. 1 while the set of the loser of the 6th race will be said to be set no. 5. Now, possible candidates for the first three positions exclude the followings: 1. Any horse from set 4 or set 5. 2. Any horse except the winner from set 3,. 3. Any horse except the winner and the 2nd position from set 2. 4. Any horse except the winner, 2nd position and 3rd position from set 1. So now we have 6 candidates for top 3 positions. However, we know that the winner of set 1 is the fastest horse in the whole group of 25 sets. So now we have 5 candidates for the second and third position. What better way to find out who's who than to have a race of these 5 horses. Race them and this will solve our problem in just 7 races.

Technical 1)Point out the mistake: #include<iostream.h> void main() { enum result { first,second,third}; result a=first; int b=a; result c=1; } Ans : result c =1; result is of type enum.It cant be initialised to an integer. 2)Debug : #include<iostream.h> int main() { char t[]=string functions are simple; int l=strlen(t); cout<<l; } Ans: <string.h> is missing

3)Point out the errors #include<iostream.h> #include<string.h> class address { private: char name[10]; char city[10];

public: address(char *p,char *q) { strcpy(name,p); strcpy(city,q); } } int main() { address obj(ram, chennai); } Answer: class name must terminate with ; 4)Pick out the error #include<iostream.h> #include<conio.h> class date { private: int day,month,year; date() { day=2; month=7; year=1998; } }; int main() { date today; getch(); }

Answer: private members cannot access. 5)Write the output of the following #include<iostream.h> #include<conio.h> void main() { cout *p=hello; char *q=p; cout<<p<<endl<<q; q=goodbye; cout<<p<<endl<<q; } Answer: Hello Hello Hello goodbye Puzzles 1)

Answer

: 19

Explanation : As you move diagonally down, numbers follow the sequence of Prime Numbers.

2)

Answer

: Q

Explanation : Adding the three numbers in each square together gives the numerical value of the letter at the centre of each square.

3)

Answer

: 5:19

Explanation : Starting with the watch on the left, add 42 minutes to the time shown to give the time on the next watch to the right.

4)

Answer

: Hand pointing to 5

Explanation : Starting with the top clock and moving anti-clockwise around the others, the hour hand moves back 1 hour, then 2, then 3 etc, while the minute hand moves forward 10 minutes each time.

5)

Answer

: K

Explanation : The numerical values of the letters in opposite segments of the circle always add up to 17.

Vous aimerez peut-être aussi