Oct 27, 2010

What is the relation?

P's father is Q's son. M is paternal uncle of P and N is the brother of Q. How is N related to M?


Answer:
N is paternal uncle of M.

Find out the missing no. in the series..

Find the next no. of the following series:
(i) 3,10,101,?
(ii) 1,2,4,9,28,?
(iii) 24,60,120,210,?


Answer: 
(i) 3,10,101,10202
(ii) 1,2,4,9,28,125
(iii) 24,60,120,210,336


Explanation: 
(i) 3, (3*3+1), (10*10+1), (101*101=1)..
(ii) (0!+0), (1!+1), (2!+2), (3!+3), (4!+4), (5!+5)..
(iii) (3^3-3), (4^3-4), (5^3-5), (6^3-6)..

Find the output.

Try this..
main()
{
printf("\nab");
printf("\bsi");
printf("\rha");
}
What is the output of above program??

Answer:
hai

Explanation:
The first printf statement prints 'ab'
The second printf statement prints 'asi'(bcoz \b backspace cmd prints next to 'a' and overwrites 'b')
The third printf statement prints 'hai' (bcoz \r return cmd overwrites on 'asi')

How many times do they toll?

Three bells toll together at intervals of 4,6 and 8 seconds. In two minutes how many times do they toll together???

Answer:
5 times.
Explanation:
The LCM of 4,6 and 8 is 24
Given 2 minutes i.e 120 seconds
No. of times = 120(time in sec)/24(LCM) = 5 times