Monday, December 10, 2007

Virtusa placement paper -2

VIRTUSA
I am herewith sending the Virtusa paper held on 11th feb 2004 at Hyderabad.
Virtusa Paper.
-------------
section-A (5*2=10 marks)
----------
1.Pick out the Odd word out:
a. CDBFE , JIHKL ,OMQRP ,WUXVY
2.Neem,Team,Starter,Commit.
Ans:
Reason:
3.101 , 101 ,107 ,119 ,137 ,_____
section-B (4*5=20 m)
-----------
1.Arrange the numbers 1 to 9 in any way to obtain the sum 100.
a)Use nos 1 to 9 in the natural order of occurance.
b)use all the 4 operators and parathesis.
Ans:((1+2)/3)+4+(5*6)-7+(8*9)
2.There are animals like goat,sheep and cow.one goat and seven sheeps eat as much as
one
cow eats.Also, three goats and one cow eat as much as eleven sheeps.If there is some
fodder
which is sufficient for a cow for three days,then for how many days will that fodder feed
the goat.
3.There is a sphere.The volume of the sphere is (pi*theta).and the surface area
is (pi*gamma).where theta and gamma are five digit numbers.find the radius of the
sphere.
section -C (15 m)
-----------
write a brief account on the measures to be taken to against the US law of stopping
outsourcing to India.
section -D (4*10=40)
writa a prg in any language:
1. Wirte a function to accept a number 'n' and
a)if n is negative then return -1.
b)if n is postive and perfect number then return sqrt(n).
c)if n is positive and not a perfect no. then return n(n+1)/2
2.Write a prg to print in the format
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5.
3.double fn(double z,int y)
{
double a =1.0;
while(cond)
{
if (y%2==1)
a=a*z;
y/=2;
z*=z;
}
return a;
}
what does the function do an how do you eliminate the shortcomings
of the function.
4.Write a prg to generate the next number (ex:143=1^2+4^2+3^2=26)repeat this sequence
tillyou get 1 or 4.
B) (15 m)
Write a prg to accept two time stamps in the given format HH:MM:SS
using apropriate datatypes and find the difference between the time stamps in seconds.
------------------------------------------

No comments: