-->

Virtusa Placement Paper

1. A 4 kg cuboid is reduced to 1/4th of its original dimension.What will be the new weight? ans: 62.5 gm
2. A bank pays 4% simple interest compunded annually.x deposits 100\$ at the beginning of each yr then What will be the amount at the end of the 5th yr.
ans: 563(not sure)
3. What will be the growth of a tree whose current height is 60 inches with a growth rate of 10%, at the end of 3 years.the value rounded upwards.
ans: 81(not sure)
4.A a frog lying in a 30 feet well climbs at the rate of 3ft/hr but slips 2ft each time.How many hours will it take for the frog to climb out.
a)26 hrs b)27 hrs c)28 hrs d)29 hrs ans: 28 (i think)
5. A water lily grows at a rapid rate filling the pond in 20 days.How many days will it take to fill the pond if we start with 2 such lilies with same growth rate. ans: 19 days
6. 20 people go trekking uphill.30% get frostbite and leave the 1st day.of the remaining 2 get sprain and giveup.of the remaining only half of them make it to the top.How amny reached the top. ans: 6
7. Aiven a liquid and two containers of 400ml and 600 ml respectively can you measure 500ml.if yes explain.
8. Candy bars are distributed to children 3 to each except the one at the end who got 2.if only 2 were given to each then 8 candy bars were left.What was the original no of candy bars. ans:26

1. When a user inputs values, if it is even perform a divide by 2, else perform n*n-1 and store them in a sequence. The output must be the largest power of 2 in the given sequence.
2. Write a prog to generate pythagorian triads of the form a^2+b^2=c^2.eg3,4,6. The sequence should not repeat by changing the order of the numbers like 4,3,6.

1.Pick out the Odd word out:
a. CDBFE , JIHKL ,OMQRP ,WUXVY
2.Neem,Team,Starter,Commit.
3.101 , 101 ,107 ,119 ,137 ,_____
section-B

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 aseleven 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 thesphere.
section -C

Q. Write a prg in any language:
1. Wirte a function to accept a number 'n' and
a)if and is negative then return -1.
b)if and is postive and perfect number then return sqrt(n).
c)if and 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 program to generate the next number (ex:143=1^2+4^2+3^2=26)repeat this sequence till you get 1 or 4.