Showing posts with label Tcs quants paper. Show all posts
Showing posts with label Tcs quants paper. Show all posts

Thursday, 14 June 2012

TCS Placement Paper - Quants


1. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of 1 liter every hour in A, it gets filled up like, 10, 20, 40,80, 160…..in tank B. 1/8 th of the tank B is filled in 22 hours. What is the time to fill the tank fully?

a) 26
(b) 25
(c) 5
(d) 27

Ans: 22+log 2 base 8=22+4=26
------------------------------------------------------------------------------------------------------------
2. A sheet of paper has statements numbered from 1 to 70. For all values of n from 1 to 70. Statement n says 'At least n of the statements on this sheet are false.' Which statements are true and which are false?
(a) The even numbered statements are true and the odd numbered are false.
(b) The odd numbered statements are true and the even numbered are false.
(c) The first 35 statements are true and the last 35 are false.
(d) The first 35 statements are false and the last 35 are false.

Ans. c

Note: For this type of Questions, follow this:
--At least- I'st half are true, Last half are false
--Exactly- Last second one is true or (N-1)th Statement is true
--Almost- All are true.
-----------------------------------------------------------------------------------------------------------
3. Unnecessary data. A lady has fine gloves and hats in her closet- 18 blue- 32 red , 10 white , 25 yellow, 55 purple, 30 orange. The lights are out and it is totally dark in spite of the darkness. She can make out the difference between a hat and a glove. She takes out an item out of the closet only if she is sure that if it is a glove. How many gloves must she take out to make sure she has a pair of each color of blue, red, yellow?

(a) 59
(b) 8
(c) 50
(d) 42

Ans: a(32+25+2)
Note: For this type of questions:
Bigger+Middle+1 (Suppose 18, 32, 25 =32+25+1), If you do not find answer in options, choose the one closer those the answer you got.
------------------------------------------------------------------------------------------------------------
4. The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 12 such programmers take 12 minutes to write 12 lines of code in total. How long will it take 72 programmers to write 72 lines of code in total?

For this type question you should follow d step of basic math that will helpful you get enough time from  that.
12 prog 12 line 12 min
1 prog 12 line 12*12
1 1 12*12/12
72 1 12*12/(12*72)
72 72 12*12*72/(12*72)

Ans:12
Note: This question appears 3 times in our question but app is different please follow basic rule think it it is very very easy.
------------------------------------------------------------------------------------------------------------
5. 12 people {a1, a2, …, a12} meet and shake hands in a circular fashion. In other words, there are totally 36 handshakes involving the pairs, {a1, a2}, {a2, a3}, …, {a11, a12}, {a12, a1}. Then size of the smallest set of people such that the rest have shaken hands with at least one person in the set is

(a) 12
(b) 4
(c) 18
(d) 11
Ans. B (N/3)
------------------------------------------------------------------------------------------------------------
6. 10 suspects are rounded by the police and questioned about a bank robbery. Only one of them is guilty. The suspects are made to stand in a line and each person declares that the person next to him on his right is guilty. The rightmost person is not questioned. Which of the following possibilities are true?
A. All suspects are lying.
B. leftmost suspect is innocent.
C. leftmost suspect is guilty

(a) A only
(b) A or C
(c) A or B
(d) B only

Ans. c
Note: Remember it I don't know the logic
------------------------------------------------------------------------------------------------------------
7. Alok and Bhanu play the following min-max game. Given the expression N = 15 + X*(Y – Z) Where X, Y and Z are variables representing single digits (0 to 9), Alok would like to maximize N while Bhanu would like to minimize it. Towards this end, Alok chooses a single digit number and Bhanu substitutes this for a variable of her choice (X, Y or Z). Alok then chooses the next value and Bhanu, the variable to substitute the value. Finally Alok proposes the value for the remaining variable. Assuming both play to their optimal strategies, the value of N at the end of the game would be?
Ans. 15+18 =33
Note: For this type of questions:
x+y-z=11
x-y-z=2
x*(y+z)=18
------------------------------------------------------------------------------------------------------------
8. How many four digit numbers can be formed using the digits 1, 2, 3, 4, 5 (but with repetition) that are divisible by 4? Can you help Alok find the answer?

(a) 100
(b) 125
(c) 75
(d) 85

Ans:. 5^n-1= 5^4-1=125, n= no of digits
------------------------------------------------------------------------------------------------------------
9. The age of the two friends were in the ration of 6:5.If the sum of their ages is 66.Then after how many years their ratio will become 7:6?

a)11 b)6 c)10 d)12
------------------------------------------------------------------------------------------------------------
10 The age of the two friends were in the ration of 2:3.If the sum of their ages is 55.Then after how many years their ratio will become 4:5?

a)11 b)33 c)22 d)44
------------------------------------------------------------------------------------------------------------
11.A volume of 10936 l water is in a container of sphere.How many semisphere of volume 4l each will be required to tranfer all the water into the small semispheres?

a)2812 b)8231 c)2734 d)4222
-----------------------------------------------------------------------------------------------------------
12.A person ismanufacturing a house.He bought 20 ropes of wire which has a density of 300 Kg/m3.The height of the building to be constructed is 40 m.If the capacity of the current passed in the wire is 20 A and the voltage capacity is 80 Volts.Then what will be the opposing force to the current if the wire is used ?

a)2 b)4 c)8 d)1600
------------------------------------------------------------------------------------------------------------
13.A horse chases a pony 2 hours after the pony runs.Horse takes 3 hours to reach the pony.If the average speed of the horse is 81Kmph.Then what is the average speed of the pony?

a)46.4 b)51 c)53.4 d)48.6
------------------------------------------------------------------------------------------------------------
14.The difference between two no is 9 and the product of the two is 14.What is the square of their sum?

a)120 b)130 c)137 d)145
----------------------------------------------------------------------------------------------------------- 15. On planet korba, a solar blast has melted the ice caps on its equator. 9 years after the ice melts, tiny planetoids called echina start growing on the rocks. Echina grows in the form of circle, and the relationship between the diameter of this circle and the age of echina is given by the formula d = 4*√ (t-9) for t ≥ 9 where d represents the diameter in mm and t the number of years since the solar blast.Jagan recorded the radius of some echina at a particular spot as 7mm. How many years back did the solar blast occur?

a) 17 b)21.25 c)12.25 d)14.05
----------------------------------------------------------------------------------------------------------- 16.A man goes 50Km north , then turned left walked 40Km, then turned right ? In which direction he is?

a)North b)South c)East d)West
-----------------------------------------------------------------------------------------------------------
17. In T.Nagar the building were numbered from 1 to 100.Then how many 4’s will be present in the numbers?

a)18 b)19 c)20 d)21
------------------------------------------------------------------------------------------------------------
18.In T.Nagar the building were numbered from 1 to 100.Then how many 6’s will be present in the numbers?

a)18 b)19 c)20 d)21
------------------------------------------------------------------------------------------------------------
19. In T.Nagar the building were numbered from 1 to 100.Then how many 1’s will be present in the numbers?

a)18 b)19 c)20 d)21
------------------------------------------------------------------------------------------------------------
20.In T.Nagar the building were numbered from 1 to 100.Then how many 0’s will be present in the numbers?

a)18 b)19 c)20 d)11
------------------------------------------------------------------------------------------------------------
21. Ferrari S.P.A is an Italian sports car manufacturer based in Maranello, Italy. Founded by Enzo Ferrari in 1928 as Scuderia Ferrari, the company sponsored drivers and manufactured race cars before moving into production of street-legal vehicles in 1947 as Ferrari S.P.A. Throughout its history, the company has been noted for its continued participation in racing, especially in Formula One where it has employed great success .Rohit once bought a Ferrari. It could go 4 times as fast as Mohan's old Mercedes. If the speed of Mohan's Mercedes is 35 km/hr and the distance traveled by the Ferrari is 490 km, find the total time taken for Rohit to drive that distance.

20.72 b) 5.18 c) 238.25 d) 6.18
------------------------------------------------------------------------------------------------------------
22. A sheet of paper has statements numbered from 1 to 70. For all values of n from 1 to 70. Statement n says ' At least n of the statements on this sheet are false. ‘Which statements are true and which are false?

a) The even numbered statements are true and the odd numbered are false.
b) The odd numbered statements are true and the even numbered are false.
c) The first 35 statements are true and the last 35 are false.
d) The first 35 statements are false and the last 35 are false.
------------------------------------------------------------------------------------------------------------
21. A man goes north 37km.turns left goes 2km.turns right goes 17km.turns right goes 2km. find distance b/w starting ending point.

a) 54 b) 27 c) 81 d) 67
------------------------------------------------------------------------------------------------------------
22. If there are 30 cans out of them one is poisoned if a person tastes very little he will die within 14 hours so if there are mice to test and 24 hours to test, how many mices are required to find the poisoned can?

a) 3 b) 2 c) 6 d) 1
------------------------------------------------------------------------------------------------------------
 23.If a and b are mixed in 3:5 ration and b and c are mixed in 8:5 ration if the final mixture is 35 liters, find the amount of b?

A) 13.34 b) 15.73 c) 16.73 d) 9.45
------------------------------------------------------------------------------------------------------------
24.If we subtract a number with y, we get 4 increase of number, once it got divided by y itself... Find that number??

A) 13 b) 12 c) 14 d) 11
------------------------------------------------------------------------------------------------------------
25. It is the class with the seating arrangement in 4 rows and 8 columns. When the teacher says 'start' the girl who is sitting in first row and first column will say 1, then the next girl sitting behind her will say 4, the next girl sitting behind that girl will say 7, in a particular order each girl is telling a number, the following girls told 10, 13 next turn is yours what u will say?

a) 15 b) 17 c) 14 d) 16
---------------------------------------------------------------------------------------------------------- 26. It is dark in my bedroom and I want to get two socks of the same color from my drawer, which contains 24 red and 24 blue socks. How many socks do I have to take from the drawer to get at least two socks of the same color?

A) 2 b) 3 c) 48 d) 25
------------------------------------------------------------------------------------------------------------
27. If the Valentine’s Day in 2005 falls on Monday, then on which day will the Valentine’s Day fall on 2010?

A) Saturday b) Thursday c) Wednesday d) Sunday
------------------------------------------------------------------------------------------------------------
28. A person run from A to B.He took ¼ of the time less to reach B when compare to run at normal Speed.Then how many percentage he has increased his speed?

a)40 b)44.4 c)33.3 d)22.2
------------------------------------------------------------------------------------------------------------
 29.An athlete decides to run the same distance in 1/4th less time that she usually took. By how much percent will she have to increase her average speed?

a)40 b)44.4 c)33.3 d)22.2
------------------------------------------------------------------------------------------------------------
30. In a building there are 5 rooms.Each having a equal area .The length of the room is 4m and breadht is 5 m.The height of the rooms are 2m.If 17 bricks are needed to make a square meter then how many bricks are needed to make the floor of a particular room?

a)320 b)380 c)340 d)300
------------------------------------------------------------------------------------------------------------
31. One man want to build a wall .The length and breadth of the wall are 20 and 30 respectively. He need 35 bricks for one square centimeter then how many bricks he need?

a)21,500 b)30,000 c)21,000 d)20,000
------------------------------------------------------------------------------------------------------------
32. In a hotel we can order two types of varities,but we can make 6 more variteis in home.One can choose the four varities with two from hotel as must.Find how many ways one can order.

a)14 b)15 c)56 d)28
------------------------------------------------------------------------------------------------------------
33. If a pipe can fill the tank within 6hrs.But due to leak it takes 30 min more.Now the tank is full then how much time will it take to empty the tank throught the leak.?

a)78 b)56 c)66 d)59
------------------------------------------------------------------------------------------------------------
34.The bacteria has the probability of split into 3 and probability to die is 1/3rd of the total bacteria.Let the probability is P.Some of them survived with probability 1/5.Then which among the following relation is true?
a)P=1/3+1/5*3 b)P=1/5*(1/8-3)
----------------------------------------------------------------------------------------------------------
35. There is a bacteria which has the probability of die 1/3 of its total number or it may tripled. Find out the probability

A. P=1/3+(2/3*p^3) B. P=2/3+(2/3*p^3) C. P=2/3+(1/3*p^3) D P=2/3+(2/3*p^3)
------------------------------------------------------------------------------------------------------------
36. In T.Nagar the building were numbered from 1 to 100.Then how many 4’s will be present in the numbers?

a)18 b)19 c)20 d)21
----------------------------------------------------------------------------------------------------------- 37.Amrith told to Anand in front of a Photo that “He is the son of my father’s son”.Find who is in the picture if amrith have no brothers and sisters.

a)Amrith himself b)Amrith’s Uncle c)Amrith’s Father d)Amrith’s son
------------------------------------------------------------------------------------------------------------
38.One person has no siblings and says,” the guy in the photo is the only son of my father ‘s son”. What is the relation of the guy to the person?
------------------------------------------------------------------------------------------------------------
39. One grand father has 3 grand children two of the age difference is 3.Eldest child age is 3 times the youngest childs age and the eldest child age is two year more than the sum of other two children. Find what is the age of the elders child?

a)18 b)22 c)30 d)10.

2012 TCS Placement Questions


1. Which Is The Smallest No Divides 2880 And Gives A Perfect Square?

A.1 B.2 C.5 D.6

Ans: C
------------------------------------------------------------------------------------------------------------
2. Two Bowls Are Taken, One Contains Water And Another Contains Tea  Equal Amount . One Spoon Of Water From 1st Is Added To Second Bowl And Mixed Well, And A Spoon Of Mixture Is Taken From Second Bowl And Added To The 1st Bowl. Which Statement Will Hold Good For The Above?
{
Thought Process :
Water Bowl Tea Bowl
100 100
90w (+10w= Spoon Volume) 100tea+10water
90w+ (10*10/11)Tea+ 10/11 W 100t- (10*10/11) T
+ 10w- 10/11w
(1st Bowl’s Water Volume Is Equal To 2nd Bowls Tea Volume)
------------------------------------------------------------------------------------------------------------
3. Form 8 Digit Numbers From By Using 1, 2,3,4,5 With Repetition Is Allowed And Must Be Divisible By 4?

A.31250 B.97656 C.78125 D.97657

Ans: C
------------------------------------------------------------------------------------------------------------
4. Rearrange And Categorize The Word ‘Rapeteka’?

Ans: Bird
------------------------------------------------------------------------------------------------------------
5. One Problem On (785^3-235^3)/(785^2+785*235+235^2)

Ans: You Are Free To Carry A Calculator With You But You Should Not Use It To Solve This Kind Of Problem. Because It Is Simple:

A3-b3 / A2+ab+b2

Ans Is : A-b Here 785-235= 550 That's It.
------------------------------------------------------------------------------------------------------------
6. In School There Are Some Bicycles And 4 Wheeler Wagons. One Tuesday There Are 190 Wheels In The Campus. How Many Bicycles Are There?

Ans: 15

Thought Process : B*2+w*4=190 I.E. , B+2w=95 Now See U Can Not Solve 2 Unknowns From 1 Equation, So Just Plot Options Here To Get The Right Answer And Verify If You Are Getting Integers As Values Of B And W.
------------------------------------------------------------------------------------------------------------
7. There Are Two Persons Paul And Jay .Paul Lies On Monday, Tuesday, Wednesday And The Remaining Days He Speaks Truth. Jay Lies On Thursday, Friday, Saturday And The Remaining Days He Speaks Truth. Once They Meet Each Other, In Their Conversation Paul Says That Yesterday Is The Day One Among Those I Lie. Jay Also Says That Yesterday I Also Lie. What Is That Day?

A) Sunday. B) Tuesday. C) Thursday. D) Wednesday

[Thought Process: Now This Day Cannot Be Sunday Because In Monday Paul Speaks Truth And Sunday Everyone Tells Truth. So It Must Be Weekdays. Again, Tuesday Can Not Possible Because Monday And Tuesday Paul Speaks Truth. In Case Of Thrust Day, Paul Speaks Lie And Wednesday He Speaks True. And Joy Speaks Truth In Thursday And He Speak Lies In Wednesday. So, Thursday Is The Answer.
------------------------------------------------------------------------------------------------------------
8. A Father Has 7 Penny’s With Him And 1 Water Melon Is For 1p, 2chickoos For 1p, 3 Grapes Foe 1p. He Has Three Sons. How Can He Share The Fruits Equally?

Ans: 1 Watermelon, 2chickoos, 1grape
------------------------------------------------------------------------------------------------------------
9. (1/2) Of A Number Is 3 Times More Than The (1/6) Of The Same Number?

Ans: 9
------------------------------------------------------------------------------------------------------------
10. There Are Two Pipes A And B. If A Filled 10 Liters In Hour B Can Fills 20 Liters In Same Time. Likewise B Can Fill 10, 20, 40, 80,160…. If B Filled In (1/16) Th Of A Tank In 3 Hours, How Much Time Will It Take To Fill Completely?

Ans: 7 Hours
------------------------------------------------------------------------------------------------------------
11.A certain pump can drain a full 375-gallon tank in 15 minutes. At this rate, how many more minutes would it take to drain a full 600-gallon tank?

(A) 9 (B) 15 (C) 18 (D) 24 (E) 25
------------------------------------------------------------------------------------------------------------
12. If n is an even integer, which of the following must be an odd integer?

(A) 3n-2 (B) 3(n+1) (C)n-2 (D)n/3 (E)n^2
------------------------------------------------------------------------------------------------------------
13. Cindy has a collection of 80 records. If 40 percent of her records are jazz records, and the rest are blues records, how many blues records does she have?

(A) 32
(B) 40
(C) 42
(D) 48
(E) 50
------------------------------------------------------------------------------------------------------------
14. Express 2,750,389 in scientific notation.

(A) 27.50389 x 105
(B) 275.0389 x 103
(C) 27.50389 x 106
(D) 0.2750389 x 107
(E) 2.750389 x 106
------------------------------------------------------------------------------------------------------------
15. A rectangle and a triangle have equal areas. The length of the rectangle is 12 inches, and its width is 8 inches. If the base of the triangle is 32 inches, what is the length, in inches, of the altitude drawn to the base?

(A) 6
(B) 8
(C) 9
(D) 12
(E) 16
------------------------------------------------------------------------------------------------------------
16. If the area of a triangle is 24 and its base is 6, what is the length of the altitude to that base?

(A)3 (B)6 (C)8 (D)10 (E)unknown
------------------------------------------------------------------------------------------------------------
17.Lenny's average score after 3 tests is 88. What score on the 4th test would bring Lenny's average up to exactly 90?

(A)92 (B)93 (C)94 (D)95 (E)96
------------------------------------------------------------------------------------------------------------
18. If an integer is divisible by 6 and by 9, then the integer must be divisible by which of the following?

A. 12
B. 18
C. 24
D. 36
E. 54
------------------------------------------------------------------------------------------------------------
19.If Jeff and Jimmy have less than 22 dollars between them, and Jeff has 8 dollars, which of the following could be the number of dollars that Jimmy has?
I.12 II. 14 III. 16

A. I only
B. III only
C. I & III.
D. I & II
E. Neither I, II, nor III are correct
------------------------------------------------------------------------------------------------------------
20.Stephanie drove at an average rate of 50 miles per hour for two hours and then increased her average rate by 50% for the next 3 hours. Her average rate of speed for the 5 hours was t miles per hour. What is the value of t?

A. 55 mph
B. 60 mph
C. 65 mph
D. 70 mph
E. 75 mph
------------------------------------------------------------------------------------------------------------
21. How many complete tanks of water, each with a capacity of 3 cubic meters, are needed to fill an empty cylindrical tank whose height is 3 meters and whose base has a radius of 2 meters?

A) 12 B) 13 C) 14 D) 15 E) 16
------------------------------------------------------------------------------------------------------------
22. Any serious policy discussion about acceptable levels of risk in connection with explosions is not well served if the participants fail to use the word “explosion” and use the phrase “energetic disassembly” instead. In fact, the word “explosion” elicits desirable reactions, such as a heightened level of attention, whereas the substitute phrase does not. Therefore, of the two terms, “explosion” is the one that should be used throughout discussions of this sort.
Which of the following is an assumption on which the argument above depends?
(A) In the kind of discussion at issue, the advantages of desirable reactions to the term “explosion” outweigh the drawbacks, if any, arising from undesirable reactions to that term.
(B) The phrase “energetic disassembly” has not so far been used as a substitute for the word “explosion” in the kind of discussion at issue.
(C) In any serious policy discussion, what is said by the participants is more important than how it is put into words.
(D) The only reason that people would have for using “energetic disassembly” in place of “explosion” is to render impossible any serious policy discussion concerning explosions.
(E) The phrase “energetic disassembly” is not necessarily out of place in describing a controlled rather than an accidental explosion
------------------------------------------------------------------------------------------------------------
23. A certain shade of gray paint is obtained by mixing 3 parts of white paint with 5 parts of black paint. If 2 gallons of the mixture is needed and the individual colors can be purchased only in one-gallon or half- gallon cans, what is the least amount of paint, in gallons, that must be purchased in order to measure out the portions needed for the mixture?

(A) 2 (B) 2 ½ (C) 3 (D) 3 ½ (E) 4
------------------------------------------------------------------------------------------------------------
24. To buy a computer system, a customer can choose one of 4 monitors, one of 2 keyboards, one of 4 computers and one of 3 printers. Determine the number of possible systems that a customer can choose from.
(A) 96 (B)98 (C)98.5 (D) 94 (E)100
------------------------------------------------------------------------------------------------------------
25. A student can select one of 6 different mathematics books, one of 3 different chemistry books and one of 4 different science books. In how many different ways can a student select a book of mathematics, a book of chemistry and a book of science?

A) 14 (B)12 (C)72 (D) 74 (E)76

Wednesday, 13 June 2012

TCS Placement paper - Quants


1. How many four digit numbers can be formed using the digits 1, 2, 3, 4, 5 (but with repetition) that are divisible by 4?
(a) 100
(b) 125
(c) 75
(d) 85

Ans. 5^n-1= 5^4-1=125, n= no of digits
------------------------------------------------------------------------------------------------------------
2.On planet korba, a solar blast has melted the ice caps on its equator. 9 years after the ice melts, tiny planetoids called echina start growing on the rocks. Echina grows in the form of circle, and the relationship between the diameter of this circle and the age of echina is given by the formula d = 4* (t-9) for t ≥ 9
Where d represents the diameter in mm and t the number of years since the solar blast.
Jagan recorded the radius of some echina at a particular spot as 12mm. How many years back did the solar blast occur?

(a) 17
(b) 21.25
(c) 12
(d) 12.06
Ans. c
------------------------------------------------------------------------------------------------------------
3.. Ferrari S.P.A is an Italian sports car manufacturer based in Maranello, Italy. Founded by Enzo Ferrari in 1928 as Scuderia Ferrari , the company sponsored drivers and manufactured race cars before moving into production of street-legal vehicles in 1947 as Feraari S.P.A. Throughout its history, the company has been noted for its continued participation in racing, especially in Formula One where it has employed great success. Rohit once bought a Ferrari . It could go 4 times as fast as Mohan's old Mercedes. If the speed of Mohan's Mercedes is 46 km/hr and the distance traveled by the Ferrari is 953 km, find the total time taken for Rohit to drive that distance.

(a) 20.72
(b) 5.18
(c) 238.25
(d) 6.18

Ans. b
----------------------------------------------------------------------------------------------------------
4. A sheet of paper has statements numbered from 1 to 70. For all values of n from 1 to 70. Statement n says 'At least n of the statements on this sheet are false.' Which statements are true and which are false?

(a) The even numbered statements are true and the odd numbered are false.
(b) The odd numbered statements are true and the even numbered are false.
(c) The first 35 statements are true and the last 35 are false.
(d) The first 35 statements are false and the last 35 are false.

Ans. c
Note: For this type of Questions, follow this:
At least- Ist half are true, Last half are false
Exactly- Last second one is true or (N-1)th Statement is true
Almost- All are true.
------------------------------------------------------------------------------------------------------------
5. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of one liter every hour in A, it gets filled up like 10, 20, 40, 80, 160 in tank B. (At the end of first hour, B has 10 liters, second hour it has 20, and so on). If tank B is 1/32 filled after 21 hours, what is the total duration required to fill it completely?

(a) 26 hrs
(b) 25 hrs
(c) 5 hrs
(d) 27 hrs
Ans. a
------------------------------------------------------------------------------------------------------------
6. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of one liter every hour in A, it gets filled up like 10, 20, 40, 80, 160... in tank B. (At the end of first hour, B has 10 liters , second hour it has 20, and so on). If tank B is 1/16 filled after 4 hours, what is the total duration required to fill it completely?

(a) 8hrs
(b) 25 hrs
(c) 5 hrs
(d) 27 hrs
Ans. a
------------------------------------------------------------------------------------------------------------
7. Unnecessary data. A lady has fine gloves and hats in her closet- 18 blue- 32 red , 10 white , 25 yellow, 55 purple, 30 orange. The lights are out and it is totally dark inspite of the darkness. She can make out the difference between a hat and a glove. She takes out an item out of the closet only if she is sure that if it is a glove. How many gloves must she take out to make sure she has a pair of each color of blue, red, yellow?

(a) 59
(b) 8
(c) 50
(d) 42
Ans. a(32+25+2)
Note: For this type of questions:
Bigger+Middle+1 (Suppose 18, 32, 25 =32+25+1), If you do not find answer in options, choose the one closer tho the answer you got.
------------------------------------------------------------------------------------------------------------
8.The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 12 such programmers take 12 minutes to write 12 lines of code in total. How long will it take 72 programmers to write 72 lines of code in total?

(a) 6
(b) 18
(c) 72
(d) 12
Ans. d
Note: N1T1/W1=N2T2, W=No. of Lines, N=No. of PRGMRS, T=Time
------------------------------------------------------------------------------------------------------------
9. The citizens of planet nigiet are 6 fingered and have thus developed their decimal system in base 6. A certain street in nigiet contains 1000 (in base 8) buildings numbered 1 to 1000. How many 3s are used in numbering these buildings?

(a) 256
(b) 54
(c) 192
(d) 108
Ans. d
Note: First find no. 3s in 1000 (Decimal only), Definately you will get 300, Now convert 300 into 300 base 6 by this 3*6^2+0*6^1+0*6^0
------------------------------------------------------------------------------------------------------------
10. 12 people {a1, a2, …, a12} meet and shake hands in a circular fashion. In other words, there are totally 36 handshakes involving the pairs, {a1, a2}, {a2, a3}, …, {a11, a12}, {a12, a1}. Then size of the smallest set of people such that the rest have shaken hands with at least one person in the set is

(a) 12
(b) 4
(c) 18
(d) 11
Ans. B (N/3)
----------------------------------------------------------------------------------------------------------- 11. Alice and Bob play the following coins-on-a-stack game. 100 coins are stacked one above the other. One of them is a special (gold) coin and the rest are ordinary coins. The goal is to bring the gold coin to the top by repeatedly moving the topmost coin to another position in the stack.
Alice starts and the players take turns. A turn consists of moving the coin on the top to a position i below the top coin (0 = i = 100). We will call this an i-move (thus a 0-move implies doing nothing). The proviso is that an i-move cannot be repeated; for example once a player makes a 2-move, on subsequent turns neither player can make a 2-move.
If the gold coin happens to be on top when it’s a player’s turn then the player wins the game.

A. Alice has no winning strategy.
B. Initially, the gold coins the third coin from the top. Then
C. In order to win, Alice’s first move should be a 0-move.
D. In order to win, Alice’s first move should be a 1-move.

Ans. D
------------------------------------------------------------------------------------------------------------ 12. people meet and shake hands. The maximum number of handshakes possible if there is to be no “cycle” of handshakes is (A cycle of handshakes is a sequence of k people a1, a2, ……, ak (k > 2) such that the pairs {a1, a2}, {a2, a3}, ……, {ak-1, ak}, {ak, a1} shake hands).

(a)7
(b) 6
(c) 9
(d) 8
Ans. c **(N-1)**
------------------------------------------------------------------------------------------------------------ 13. After the typist writes 12 letters and addresses 12 envelopes, she inserts the letters randomly into the envelopes (1 letter per envelope). What is the probability that exactly 1 letter is inserted in an improper envelope?

(a) 0
(b) 12/212
(c) 11/12
(d) 1/12
Ans. a
------------------------------------------------------------------------------------------------------------
14. 10 suspects are rounded by the police and questioned about a bank robbery. Only one of them is guilty. The suspects are made to stand in a line and each person declares that the person next to him on his right is guilty. The rightmost person is not questioned. Which of the following possibilities are true?

A. All suspects are lying.
B. leftmost suspect is innocent.
C. leftmost suspect is guilty

(a) A only
(b) A or C
(c) A or B
(d) B only

Ans. c
------------------------------------------------------------------------------------------------------------
15. Given 3 lines in the plane such that the points of intersection form a triangle with sides of length 20, 20 and 30, the number of points equidistant from all the 3 lines is

(a) 4
(b) 3
(c) 0
(d) 1

Ans. a 3 lines are given so answer is 4 one incenter and 3 excenters. If it is 3 line segments then answer would be 1
------------------------------------------------------------------------------------------------------------
16. Alok and Bhanu play the following min-max game. Given the expression N = 15 + X*(Y – Z)

Where X, Y and Z are variables representing single digits (0 to 9), Alok would like to maximize N while Bhanu would like to minimize it. Towards this end, Alok chooses a single digit number and Bhanu substitutes this for a variable of her choice (X, Y or Z). Alok then chooses the next value and Bhanu, the variable to substitute the value. Finally Alok proposes the value for the remaining variable. Assuming both play to their optimal strategies, the value of N at the end of the game would be

Ans. 15+18 =33
Note: For this type of questions:
x+y-z=11
x-y-z=2
x*(y+z)=18
------------------------------------------------------------------------------------------------------------
17. A hare and a tortoise have a race along a circle of 100 yards diameter. The tortoise goes in one direction and the hare in the other. The hare starts after the tortoise has covered 1/5 of its distance and that too leisurely. The hare and tortoise meet when the hare has covered only 1/8 of the distance. By what factor should the hare increase its speed so as the win the race? (for this values are changed)

(a) 8
(b) 5
(c) 37
(d) 80

Ans. c
------------------------------------------------------------------------------------------------------------
18(a). A sheet of paper has statements numbered from 1 to 45. For all values of n from 1 to 45, statement n says “At most n of the statements on this sheet are false”. Which statements are true and which are false?

A. The odd numbered statements are true and the even numbered are false.
B. The even numbered statements are true and the odd numbered are false.
C. All statements are true.

Ans. c
------------------------------------------------------------------------------------------------------------
18(b).  A hollow cube of size 5 cm is taken, with a thickness of 1 cm. It is made of smaller cubes of size 1 cm. If 1face of the outer surface of the cube are painted, totally how many faces of the smaller cubes remain unpainted?

(a) 900
(b) 488
(c) 563
(d) 800

Ans. c

Note: ** 588-(25* No. of painted faces)
------------------------------------------------------------------------------------------------------------
19  The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries ans also write code at the same rate. Suppose 12 such programmers take 12 minutes to write 12 lines of code in total. How many lines of code can be written by 72 programmers in 72 minutes?

(a) 72
(b) 432
(c) 12
(d) 144
Ans. b
------------------------------------------------------------------------------------------------------------
 20. The teacher is testing a student’s proficiency in arithmetic and poses the following question. 1/3 of a number is 3 more than 1/6 of the same number. What is the number? Can you help the student find the answer?

(a) 12
(b) 18
(c) 6
(d) 21
Ans. b
Note: Alok and Bhanu play the following min-max game. Given the expression N = X – Y – Z
------------------------------------------------------------------------------------------------------------
21. Where X, Y and Z are variables representing single digits (0 to 9), Alok would like to maximize N while Bhanu would like to minimize it. Towards this end, Alok chooses a single digit number and Bhanu substitutes this for a variable of her choice (X, Y or Z). Alok then chooses the next value and Bhanu, the variable to substitute the value. Finally Alok proposes the value for the remaining variable. Assuming both play to their optimal strategies, the value of N at the end of the game would be

(a) 2
(b) 4
(c) 9
(d) -18
Ans. a
------------------------------------------------------------------------------------------------------------
22.  Horse started to chase dog as it relieved stable two hrs ago. And horse started to ran with average speed 22km/hr, horse crossed 10 mts road and two small pounds with depth 3m, and it crossed two small street with 200 mts length. After traveling 6 hrs, 2hrs after sunset it got dog. compute the speed of dog?

Ans. As we have speed and travel time of horse, we can get distance traveled by it.
Note: Hence d = 22*6 = 132km,
Exactly this 132km was traveled by dog in 8 hours (as it started two hours earlier).
Hence speed of dog = 132/8 = 16.5km/hr
Ans. 16.5km/hr.
-----------------------------------------------------------------------------------------------------------
23. A and B play a game between them. The dice consist of colors on their faces (instead of number). When the dice are thrown, A wins if both show the same color, otherwise B wins. One die has 3 red faces and 3 blue faces. How many red and blue faces should the other die have if the both players have if the both players have the same chances of winning?

(a) 5 red and 1 blue faces.
(b) 1 red and 5 blue faces.
(c) 3 red and 3 blue faces.

Ans. c
------------------------------------------------------------------------------------------------------------
24. In planet OZ planet there are 8 days, Sunday to Saturday and 8th day is Oz day. There is 36 hours in a day. What is angle between 12.40?

(a) 80
(b) 81
(c) 87
(d) 89

Ans. 89
------------------------------------------------------------------------------------------------------------
25.Ramu & sangeetha went for biological analysis to a island which is 34km from their place. They travelled in a boat which went at a speed of 2m/s. when they are in half a distance in the boat sangeetha note there are 7 leg & 8 leg octopuses under the water. Ramu counted the total number of legs of octopuses and got 54. Sangeetha instantly said I know how many 7 leged octopuses are there under the water. They both reached the island after 20 min they left . How many seven leged octopuses does sangeetha calculate?

1. 4
2. 5
3. 6
4. 7

Ans : Total number of legs of both 7 & 8 leged octobus = 54. Find number of 7 leged octopuses
------------------------------------------------------------------------------------------------------------
26 The ratio of current age of X and Y is 5:7. After how many years their age becomes 7:9?

Ans : Simple ratio
------------------------------------------------------------------------------------------------------------
27. by using 1,2,3,4,5,how many 5 digit no. can be formed which is divisible by 4,repetation of no. is allowed??

Ans : 2500 (not sure)
------------------------------------------------------------------------------------------------------------
28.. XY=21 and X+Y=13.ans of X & Y will b in points..den x square+y square=??

Ans : Solve using quadratic eqn. you get x & y
------------------------------------------------------------------------------------------------------------
29. Person travels from A- to b in 9km/hr, and B to A in 4 Km/hr. What is the average speed?

Ans : 2(9*4)/9+4
------------------------------------------------------------------------------------------------------------
30. Avg marks of 5 sub is 61. Six sub mark is 89. What is the average after adding 6th?

Ans : (61*5) + 89/6
------------------------------------------------------------------------------------------------------------
31. Find number of 3’s between 1 & 100?

Ans : 19
------------------------------------------------------------------------------------------------------------
32. A pipe can fill a tank at the rate 1 litre/hr, the tank is 1/32 filled in 6 hours. After how many hows the tank is filled completely

Ans - 1/16, 1/8, ¼, ½, 1. After 5 hours.
------------------------------------------------------------------------------------------------------------
33. A man has to get air-mail. He starts to go to airport on his motorbike. Plane comes early and the mail is sent by a horse-cart. The man meets the cart in the middle after half an hour. He takes the mail and returns back, by doing so, he saves twenty minutes. How early did the plane arrive?

Ans:10min:::assume  he started at 1:00,so at 1:30 he met cart. He returned home at 2:00.so it took him 1 hour for the total jorney.by doing this he saved 20 min.so the actual time if the plane is not late is 1 hour and 20 min.so the actual time of plane is at 1:40.The cart travelled a time of 10 min before it met him.so the plane is 10 min early.
-----------------------------------------------------------------------------------------------------------. 34.  2 trees are there. One grows at 3/5 of the other. In 4 years total growth of the trees is 8 ft. what growth will smaller tree have in 2 years.

Sol) THE BIG TREE GROWS 8FT IN 4 YEARS=>THE BIG TREE  GROWS 4FT IN 2 YEARS.WHEN WE DIVIDE 4FT/5=.8*3=>2.4

Ans: 1.5 mt 4 (x+(3/5)x)=88x/5=2x=5/4 after 2 years x=(3/5)*(5/4)*2 =1.5
------------------------------------------------------------------------------------------------------------
35. There is a six digit code. Its first two digits, multiplied by 3 gives all ones. And the next two digits multiplied by 6 give all twos. Remaining two digits multiplied by 9 gives all threes. Then what is the code?

sol) Assume the digit xx xx xx (six digits)
First Two digit       xx * 3=111
                      xx=111/3=37
( first two digits of 1 is not divisible by 3   so we can use 111)
Second Two digit xx*6=222
                 xx=222/6=37
( first two digits of 2 is not divisible by 6   so we can use 222)
Thrid Two digit    xx*9=333
                   xx=333/9=37
( first two digits of 3 is not divisible by 9   so we can use 333)
------------------------------------------------------------------------------------------------------------
36. There are 4 balls and 4 boxes of colours yellow, pink, red and green. Red ball is in a box whose colour is same as that of the ball in a yellow box. Red box has green ball. In which box you find the yellow ball?

Ans : green...

Solution: Yellow box can have either of pink/yellow balls.
if we put a yellow ball in "yellow" box then it wud imply that "yellow" is also the colour of the box which has the red ball(becoz acordin 2 d question,d box of the red ball n the ball in the yellow box have same colour)
thus this possibility is ruled out...
therefore the ball in yellow box must be pink,hence the colour of box containin red ball is also pink....
=>the box colour left out is "green",,,which is alloted to the only box left,,,the one which has yellow ball..
------------------------------------------------------------------------------------------------------------
37. A bag contains 20 yellow balls, 10 green balls, 5 white balls, 8 black balls, and 1 red ball. How many minimum balls one should pick out so that to make sure the he gets at least 2 balls of same color.

Ans:he should pick 6 ball totally.

Solution: Suppose he picks 5 balls of all different colours then  when he picks up the sixth one, it must match  any on of the previously drawn ball colour.
thus he must pick 6 balls
------------------------------------------------------------------------------------------------------------
38. What is the number of zeros at the end of the product of the numbers from 1 to 100

Sol) For every 5 in unit palce one zero is added Ch eta naS
so between 1 to 100 there are 10 nos like 5,15,25,..,95 which has 5 in unit place.
Similarly for every no divisible by 10 one zero is added in the answer so between 1 to 100  11 zeros are added
for 25,50,75 3 extra zeros are added
so total no of zeros are 10+11+3=24
------------------------------------------------------------------------------------------------------------
39. 10 Digit number has its first digit equals to the numbers of 1's, second digit equals to the numbers of 2's, 3rd digit equals to the numbers of 3's .4th equals number of 4's..till 9th digit equals to the numbers of 9's and 10th digit equals to the number of 0's. what is the number?.(6marks)

Ans:2100010006

2---shows that two 1's in the ans
1---shows that one 2 in ans
0---shows no 3 in the ans
0---shows no 4 in the ans
0---shows no 5 in the ans
1---shows one 6 in the ans
0---shows no 7 in the ans
0---shows no 8 in the ans
0---shows no 9 in the ans
6---shows six 0's in the ans
------------------------------------------------------------------------------------------------------------
40. A and B are shooters and having their exam. A and B fall short of 10 and 2 shots respectively to the qualifying mark. If each of them fired atleast one shot and even by adding their total score together, they fall short of the qualifying mark, what is the qualifying mark?

Ans : 11

coz each had atleast 1 shot done so 10 + 1 = 11
n 9 + 2 = 11
so d ans is 11
------------------------------------------------------------------------------------------------------------
41. Gavaskar average in first 50 innings was 50. After the 51st innings his average was 51 how many runs he made in the 51st innings

Ans: first 50 ings.- run= 50*50=2500
51st ings.- avg 51. so total run =51*51=2601.
so run scored in that ings=2601-2500=101 runs.
------------------------------------------------------------------------------------------------------------
42. Anand finishes a work in 7 days, Bittu finishes the same job in 8 days and Chandu in 6 days. They take turns to finish the work. Anand on the first day, Bittu on the second and Chandu on the third day and then Anand again and so on. On which day will the work get over?

a) 3rd
b) 6th
c) 9th
d) 7th

Ans : 7th day

Solution: In d 1st day Anand does 1/7th of total work
similarly,
Bithu does 1/8th work in d 2nd day
hence at d end of 3 days, work done = 1/7+1/8+1/6=73/168
remaining work = (168-73)/168 = 95/168
again after 6 days of work, remaining work is = (95-73)/168 = 22/168
and hence Anand completes the work on 7th day.

TCS common interview questions - Technical


What does static variable mean?
What is a pointer?
What is a structure?
What are the differences between structures and arrays?
In header files whether functions are declared or defined?
What are the differences between malloc() and calloc()?
What are macros? what are its advantages and disadvantages?
Difference between pass by reference and pass by value?
What is static identifier?
Where are the auto variables stored?
Where does global, static, local, register variables, free memory and C Program instructions get stored?
Difference between arrays and linked list?
What are enumerations?
What is a class?
What is an object?
What is the difference between an object and a class?
What is the difference between class and structure?
What is public, protected, private?
What are virtual functions?
What is friend function?
What is a scope resolution operator?
What do you mean by inheritance?
What is abstraction?
What is a data structure?
What does abstract data type means?
Evaluate the following prefix expression " ++ 26 + - 1324" (Similar types can be asked)
Convert the following infix expression to post fix notation ((a+2)*(b+4)) -1 (Similar types can be asked)
How is it possible to insert different type of elements in stack?
Stack can be described as a pointer. Explain.
Write a Binary Search program
What is the difference between an Abstract class and Interface?
What is user defined exception?
What do you know about the garbage collector?
What is the difference between java and c++?
In an HTML form I have a button which makes us to open another page in 15 seconds. How will you do that?
What is the difference between process and threads?
What is update method called?
Have you ever used HashTable and Directory?
What are statements in Java?
What is RMI?
Explain about RMI Architecture?
What are Servelets?
What is the use of servlets?
Explain RMI Architecture?
How will you pass values from HTML page to the servlet?
How do you load an image in a Servelet?
What is purpose of applet programming?
How will you communicate between two applets?
What are the basic functions of an operating system?
Explain briefly about, processor, assembler, compiler, loader, linker and the functions executed by them.
What are the difference phases of software development? Explain briefly?
Differentiate between RAM and ROM?
What is DRAM? In which form does it store data?
What is cache memory?
What is hard disk and what is its purpose?
Differentiate between Complier and Interpreter?
What are the different tasks of Lexical analysis?
What are the different functions of Syntax phase, Sheduler?

2011 TCS placement paper - Quants


1. (1/2) of a number is 3 more than the (1/6) of the same number?

a) 6
b) 7
c) 8
d) 9
------------------------------------------------------------------------------------------------------------
2. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of 1 liter every hour in A, it gets filled up like, 10, 20, 40,80, 160..in tank B. (At the end of first hour, B has 10 liters, second hour it has 20 liters and so on). If tank B is 1/32 filled of the 21 hours, what is total duration of hours required to fill it completely?

a) 26
B) 25
c) 5
d) 27
------------------------------------------------------------------------------------------------------------
3. Smita was making a cube with dimensions 5*5*5 using 1*1*1 cubes. What is the number of cubes needed to make a hollow cube looking of the same shape?

a) 98
b)104
c)100
d) 61
------------------------------------------------------------------------------------------------------------
4. A lady has fine gloves and hats in her closet- 25blue, 7 red, and 9 yellow. The lights are out and it is totally dark. In spite of the darkness, she can make out the difference between a hat and a glove. She takes out an item out of the closet only if she is sure that if it is a glove. How many gloves must she take out to make sure she has a pair of each color?
------------------------------------------------------------------------------------------------------------
5. A game is played between 2 players and one player is declared as winner. All the winners from first round are played in second round. All the winners from second round are played in third round and so on. If 8 rounds are played to declare only one player as winner, how many players are played in first round?

a) 256
b) 512
c) 64
d) 128
------------------------------------------------------------------------------------------------------------
6. 1. There is 7 friends (A1, A2, A3....A7).If A1 have to have shake with all without repeat. How many handshakes possible?
a) 6
b) 21
c) 28
d) 7
------------------------------------------------------------------------------------------------------------
7. On planet korba, a solar blast has melted the ice caps on its equator. 9 years after the ice melts, tiny planetoids called echina start growing on the rocks. Echina grows in the form of circle, and the relationship between the diameter of this circle and the age of echina is given by the formula d = 4*√ (t-9) for t ≥ 9 where d represents the diameter in mm and t the number of years since the solar blast. Jagan recorded the radius of some echina at a particular spot as 7mm. How many years back did the solar blast occur?

a) 17
b) 21.25
c) 12.25
d) 14.05
------------------------------------------------------------------------------------------------------------
8. Ferrari S.P.A is an Italian sports car manufacturer based in Maranello, Italy. Founded by Enzo Ferrari in 1928 as Scuderia Ferrari, the company sponsored drivers and manufactured race cars before moving into production of street-legal vehicles in 1947 as Ferrari S.P.A. Throughout its history, the company has been noted for its continued participation in racing, especially in Formula One where it has employed great success .Rohit once bought a Ferrari. It could go 4 times as fast as Mohan's old Mercedes. If the speed of Mohan's Mercedes is 35 km/hr and the distance traveled by the Ferrari is 490 km, find the total time taken for Rohit to drive that distance.

a) 20.72
b) 5.18
c) 238.25
d) 6.18
------------------------------------------------------------------------------------------------------------
9. A sheet of paper has statements numbered from 1 to 70. For all values of n from 1 to 70. Statement n says ' At least n of the statements on this sheet are false. ‘Which statements are true and which are false?

a) The even numbered statements are true and the odd numbered are false.
b) The odd numbered statements are true and the even numbered are false.
c) The first 35 statements are true and the last 35 are false.
d) The first 35 statements are false and the last 35 are false.
------------------------------------------------------------------------------------------------------------
10. 3 persons a, b ,c were there A always says truth lies on Monday, Tuesday,& Wednesday. but C lies on thrusday, Friday & Saturday .one day A said" that B & C said to A that” B said “yesterday way one of the days when I lies”, C said that” yesterday way one of the days when I lies too". then which day was that?
a) Sunday
b) Thursday
c) Saturday
d) Tuesday
------------------------------------------------------------------------------------------------------------
11. By using 1,2,3,4,5,how many 5 digit no. can be formed which is divisible by 4,repetation of no. is allowed??
-----------------------------------------------------------------------------------------------------------
12. Alice and Bob play the following coins-on-a-stack game. 20 coins are stacked one above the other. One of them is a special (gold) coin and the rest are ordinary coins. The goal is to bring the gold coin to the top by repeatedly moving the topmost coin to another position in the stack. Alice starts and the players take turns. A turn consists of moving the coin on the top to a position i below the top coin (0 ≤ i ≤ 20). We will call this an i-move (thus a 0-move implies doing nothing). The proviso is that an i-move cannot be repeated; for example once a player makes a 2-move, on subsequent turns neither player can make a 2-move.If the gold coin happens to be on top when it's a player's turn then the player wins the game. Initially, the gold coins the third coin from the top. Then:-

A) In order to win, Alice's first move should be a 0-move.
B) In order to win, Alice's first move can be a 0-move or a 1-move.
C) In order to win, Alice's first move should be a 1-move.
D) Alice has no winning strategy.
------------------------------------------------------------------------------------------------------------
13. For the FIFA world cup, Paul the octopus has been predicting the winner of each match with amazing success. It is rumored that in a match between 2 teams A and B, Paul picks A with the same probability as A's chances of winning. Let's assume such rumors to be true and that in a match between Ghana and Bolivia, Ghana the stronger team has a probability of 2/3 of winning the game. What is the probability that Paul will correctly pick the winner of the Ghana-Bolivia game?
A) 4/9
B) 1/9
C) 2/3
D) 5/3
------------------------------------------------------------------------------------------------------------
14. Alok and Bhanu play the following min-max game. Given the expression N = 9 + X + Y – Z where X, Y and Z are variables representing single digits (0 to 9), Alok would like to maximize N while Bhanu would like to minimize it. Towards this end, Alok chooses a single digit number and Bhanu substitutes this for a variable of her choice (X, Y or Z). Alok then chooses the next value and Bhanu, the variable to substitute the value. Finally Alok proposes the value for the remaining variable. Assuming both play to their optimal strategies, the value of N at the end of the game would be
------------------------------------------------------------------------------------------------------------
15. 10 suspects are rounded by the police and questioned about a bank robbery. Only one of them is guilty. The suspects are made to stand in a line and each person declares that the person next to him on his right is guilty. The rightmost person is not questioned. Which of the following possibilities are true?

A. All suspects are lying or the leftmost suspect is innocent.
B. All suspects are lying and the leftmost suspect is innocent .

A) B only
B) Neither A nor B
C) A only
D) Both A and B
------------------------------------------------------------------------------------------------------------
16. The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries ans also write code at the same rate. Suppose 12 such programmers take 12 minutes to write 12 lines of code in total. How long will it take 72 programmers to write 72 lines of code in total?
------------------------------------------------------------------------------------------------------------
17. There are two boxes, one containing 10 red balls and the other containing 10 green balls. You are allowed to move the balls between the boxes so that when you choose a box at random and a ball at random from the chosen box, the probability of getting a red ball is maximized. This maximum probability is
------------------------------------------------------------------------------------------------------------
18. One grandfather has three grandchildren, two of their age difference is 3, eldest child age is 3 times youngest child’s age and eldest child’s age is two times of sum of other two children. What is the age of eldest child?
------------------------------------------------------------------------------------------------------------
19.  In a school, for a student out of 100 he got 74 of average for 7 subjects and he got 79 marks in the 8th subject. what is the average of all the subject?

a)76.251 b)80.25 c)74.265 d)74.625
------------------------------------------------------------------------------------------------------------
20.  3 persons a,b,c were there A always says truth,B lies on Monday,tusday,& Wednesday.but C lies on thrusday,Friday & saturday .one day A said”that B & C said to A that” B said “yesterday way one of the days when I lies”,C said that”yesterday way one of the days when I lies too”.then which day was that?
a)Sunday b)Thursday c)Saturday d)Tuesday
------------------------------------------------------------------------------------------------------------
21. Which is the smallest no which divides 2880 and gives a perfect square?

a)4 b)9 c)3 d)5
------------------------------------------------------------------------------------------------------------
22.  How many 9 digit numbers are possible by using the digits 1,2,3,4,5 which are divisible by 4 if the repetition is allowed?

a)57 b)56 c)59 d)58
------------------------------------------------------------------------------------------------------------
23.  how many 13 digit numbers are possible by using the digits 1,2,3,4,5 which are divisible by 4 if repetition of digits is allowed?
------------------------------------------------------------------------------------------------------------
24.  By using 1,2,3,4,5,how many 5 digit no. can be formed which is divisible by 4,repetation of no. is allowed??
------------------------------------------------------------------------------------------------------------
25.  Form 8 digit numbers from by using 1, 2,3,4,5 with repetition is allowed and must be divisible by4?
------------------------------------------------------------------------------------------------------------
26.  How many of 14 digit numbers we can make with 1,2,3,4,5 that are divisible by 4. Repetitions allowed.
------------------------------------------------------------------------------------------------------------
27. Six friends decide to share a big cake. Since all of them like the cake, they begin quarreling who gets to first cut and have a piece of the cake. One friend suggests that they have a blindfold friend choose from well shuffled set of cards numbered one to six. You check and find that this method works as it should simulating a fair throw of a die. You check by performing multiple simultaneous trials of picking the cards blindfold and throwing a die. You note that the number shown by the method of picking up a card and throwing a real world die, sums to a number between 2 and 12. Which total would be likely to appear more often – 8,9 or 10?

a) 8 b)All are equally likely c)9 d)10
------------------------------------------------------------------------------------------------------------
28. Given a collection of points P in the plane , a 1-set is a point in P that can be separated from the rest by a line, .i.e the point lies on one side of the line while the others lie on the other side. The number of 1-sets of P is denoted by n1(P). The minimum value of n1(P) over all configurations P of 5 points in the plane in general position (.i.e no three points in P lie on a line) is
-----------------------------------------------------------------------------------------------------------
29. Jagan recorded the radius of some echina at a particular spot as 12mm. How many years back did the solar blast occur?

(a) 17
(b) 21.25
(c) 12
(d) 12.06
Ans. c
------------------------------------------------------------------------------------------------------------
30. Ferrari S.P.A is an Italian sports car manufacturer based in Maranello, Italy. Founded by Enzo Ferrari in 1928 as Scuderia Ferrari , the company sponsored drivers and manufactured race cars before moving into production of street-legal vehicles in 1947 as Feraari S.P.A. Throughout its history, the company has been noted for its continued participation in racing, especially in Formula One where it has employed great success. Rohit once bought a Ferrari . It could go 4 times as fast as Mohan's old Mercedes. If the speed of Mohan's Mercedes is 46 km/hr and the distance traveled by the Ferrari is 953 km, find the total time taken for Rohit to drive that distance.

(a) 20.72
(b) 5.18
(c) 238.25
(d) 6.18

Ans. b
------------------------------------------------------------------------------------------------------------
31. A sheet of paper has statements numbered from 1 to 70. For all values of n from 1 to 70. Statement n says 'At least n of the statements on this sheet are false.' Which statements are true and which are false?

(a) The even numbered statements are true and the odd numbered are false.
(b) The odd numbered statements are true and the even numbered are false.
(c) The first 35 statements are true and the last 35 are false.
(d) The first 35 statements are false and the last 35 are false.

Ans. c
Note: For this type of Questions, follow this:
At least- Ist half are true, Last half are false
Exactly- Last second one is true or (N-1)th Statement is true
Almost- All are true.
------------------------------------------------------------------------------------------------------------
32. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of one liter every hour in A, it gets filled up like 10, 20, 40, 80, 160 in tank B. (At the end of first hour, B has 10 liters, second hour it has 20, and so on). If tank B is 1/32 filled after 21 hours, what is the total duration required to fill it completely?

(a) 26 hrs
(b) 25 hrs
(c) 5 hrs
(d) 27 hrs
Ans. a
------------------------------------------------------------------------------------------------------------
33. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of one liter every hour in A, it gets filled up like 10, 20, 40, 80, 160... in tank B. (At the end of first hour, B has 10 liters , second hour it has 20, and so on). If tank B is 1/16 filled after 4 hours, what is the total duration required to fill it completely?

(a) 8hrs
(b) 25 hrs
(c) 5 hrs
(d) 27 hrs
Ans. a
------------------------------------------------------------------------------------------------------------
34. Unnecessary data. A lady has fine gloves and hats in her closet- 18 blue- 32 red , 10 white , 25 yellow, 55 purple, 30 orange. The lights are out and it is totally dark inspite of the darkness. She can make out the difference between a hat and a glove. She takes out an item out of the closet only if she is sure that if it is a glove. How many gloves must she take out to make sure she has a pair of each color of blue, red, yellow?

(a) 59
(b) 8
(c) 50
(d) 42
Ans. a(32+25+2)
Note: For this type of questions:
Bigger+Middle+1 (Suppose 18, 32, 25 =32+25+1), If you do not find answer in options, choose the one closer tho the answer you got.
------------------------------------------------------------------------------------------------------------
35. The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 12 such programmers take 12 minutes to write 12 lines of code in total. How long will it take 72 programmers to write 72 lines of code in total?

(a) 6
(b) 18
(c) 72
(d) 12
Ans. d
Note: N1T1/W1=N2T2, W=No. of Lines, N=No. of PRGMRS, T=Time
------------------------------------------------------------------------------------------------------------
36. The citizens of planet nigiet are 6 fingered and have thus developed their decimal system in base 6. A certain street in nigiet contains 1000 (in base 8) buildings numbered 1 to 1000. How many 3s are used in numbering these buildings?

(a) 256
(b) 54
(c) 192
(d) 108
Ans. d
Note: First find no. 3s in 1000 (Decimal only), Definately you will get 300, Now convert 300 into 300 base 6 by this 3*6^2+0*6^1+0*6^0
------------------------------------------------------------------------------------------------------------
37.12 people {a1, a2, …, a12} meet and shake hands in a circular fashion. In other words, there are totally 36 handshakes involving the pairs, {a1, a2}, {a2, a3}, …, {a11, a12}, {a12, a1}. Then size of the smallest set of people such that the rest have shaken hands with at least one person in the set is

(a) 12
(b) 4
(c) 18
(d) 11
Ans. B (N/3)
------------------------------------------------------------------------------------------------------------
38. Alice and Bob play the following coins-on-a-stack game. 100 coins are stacked one above the other. One of them is a special (gold) coin and the rest are ordinary coins. The goal is to bring the gold coin to the top by repeatedly moving the topmost coin to another position in the stack.
Alice starts and the players take turns. A turn consists of moving the coin on the top to a position i below the top coin (0 = i = 100). We will call this an i-move (thus a 0-move implies doing nothing). The proviso is that an i-move cannot be repeated; for example once a player makes a 2-move, on subsequent turns neither player can make a 2-move.
If the gold coin happens to be on top when it’s a player’s turn then the player wins the game.

A. Alice has no winning strategy.
B. Initially, the gold coins the third coin from the top. Then
C. In order to win, Alice’s first move should be a 0-move.
D. In order to win, Alice’s first move should be a 1-move.

Ans. D
------------------------------------------------------------------------------------------------------------
39. people meet and shake hands. The maximum number of handshakes possible if there is to be no “cycle” of handshakes is (A cycle of handshakes is a sequence of k people a1, a2, ……, ak (k > 2) such that the pairs {a1, a2}, {a2, a3}, ……, {ak-1, ak}, {ak, a1} shake hands).

(a)7
(b) 6
(c) 9
(d) 8

Ans. c **(N-1)**
------------------------------------------------------------------------------------------------------------
40. Amal bought 5 pens, 7 pencils and 4 erasers. Rajan bought 6 pens, 8 erasers and 14 pencils for an amount which was half more than what Amal had paid. What % of the total amount paid by Amal was paid for pens?

a) 37.5%
b) 62.5%
c) 50%
d) None of these


TCS placement paper - Quants


1. The age of Ram and Sayam are in the ratio 5:6 and after 4 years their ratios are 7:8 then what is the present age of Sayam?

Ans. 12years (names and values may change)
------------------------------------------------------------------------------------------------------------
2. In school there are some bicycles and 4wheeler wagons.one Tuesday there are 190 wheels in the campus. How many bicycles are there?

Ans. 15
------------------------------------------------------------------------------------------------------------
3. Six friends go to pizza corner there are 2 types of pizzas. And six different flavors are there they have to select 4 flavors from 16 flavors. In how many ways we can select?

Ans. 16C4
------------------------------------------------------------------------------------------------------------
4. 3, 15, x, 51, 53,159,161. Find X

Ans. 17
------------------------------------------------------------------------------------------------------------
5. 3 friends A, B, C went for week end party to McDonald’s restaurant and there they measure there weights in some order IN 7 rounds. A B C AB BC AC ABC. Final round measure is 155 kg then find the average weight of all the 7 rounds?

Ans. 4(155)/7=31
------------------------------------------------------------------------------------------------------------
6. The cost of making robot is divided into cost of material, cost of repairing and cost of painting in the ratio of 5:2:3. The cost used for material is 200. Find the total cost of making the robot?

Ans. 400
------------------------------------------------------------------------------------------------------------
7. A triangle is made from a rope. The sides of the triangle are A cm, B cm and C cm (I do not remember the numerical value)What will be the area of the square made from the same rope?

Ans. ( (A+B+C)/4)2
------------------------------------------------------------------------------------------------------------
8. What is the distance of the z-intercept from the x-intercept in the equation ax+by+cz=d (I do not remember the values of a, b, c, d).

Ans. sqrt ((d/a) 2+ (d/c) 2)
------------------------------------------------------------------------------------------------------------
9. A scientist in Antarctic region conducts research on bears came to know that bears changes according to the location .once he moves 1 mile towards north, then he moves 2 miles towards east, then 1 mile towards south. Now the color of bear he found will be in:

Ans. white
------------------------------------------------------------------------------------------------------------
10. Two pipes A and B fill at A certain rate B is filled at 10,20,40,80,. If 1/16 of B if filled in 17 hours what time it will take to get completely filled

Ans. 21
------------------------------------------------------------------------------------------------------------
11. A boy bought a roll A of 56 inches wide and 141 yards long. He also bought B of 77 inches wide of length 333yards. We don’t want any details of B. Some irrelevant matter. Final question is Time taken for cutting A into 1 yard piece is 2 seconds. Time taken to cut into 141 pieces of 1 yard each is?

Ans. is 2(141) =242
------------------------------------------------------------------------------------------------------------
12. Person buys a horse for 15 ponds, after one year he sells it for 20 pounds. After one year, again he buys the same horse at 30 pounds and sells it for 40 pounds. What is the profit for that person?

Ans. is 15 pounds
------------------------------------------------------------------------------------------------------------
13. There are 1000 pillars for a temple. 3 friends Linda, Chelsey, Juli visited that temple. (Some unrelated stuff) Linda is taller than Chelsea and taller than 2 of 1000 pillars. Julia is shorter than Linda. Find the correct sentence?

(a) Linda is shorter among them
(b) Chelsea is taller than Julia
(c) Chelsea is shorter than Julia
(d) Cannot determine who is taller among Chelsea and Julia

Ans. (d)
------------------------------------------------------------------------------------------------------------
14. In a family there are some boys and girls. All boys told that they are having equal no of brothers and sisters and girls told that they are having twice the no. of brothers than sisters. How many boys and girls present in a family?

Ans. is 4 boys and 3 girls
------------------------------------------------------------------------------------------------------------
15. Ram buys a cycle for 31 dollars and given a cheque of amount 35 dollars. Shop Keeper exchanged the cheque with his neighbor and gave change to Ram. After 2 days, it is known that cheque is bounced. Shop keeper paid the amount to his neighbor. The cost price of cycle is 19 dollars. What is the profit/loss for shop keeper?

Ans. is 23(cost price + change given).
------------------------------------------------------------------------------------------------------------
16. Metal strip of width ‘x’ cm. 2 metal strips are placed one over the other, then the combine length of 2 strips is ‘y’. If ‘z’ strips are placed in that manner. What is the final width of that arrangement?

Ans. is (z-1) (y-x) +x.
------------------------------------------------------------------------------------------------------------
17. A game is played between 2 players and one player is declared as winner. All the winners from first round are played in second round. All the winners from second round are played in third round and so on. If 8 rounds are played to declare only one player as winner, how many players are played in first round

Ans. is 28.
------------------------------------------------------------------------------------------------------------
18. There are 3 boys A, B, C and 2 Girls D, E. D always sit right to A. Girls never sit in extreme positions and in the middle position. C always sits in the extreme positions. Who is sitting immediate right to E?

Ans. is B or C
------------------------------------------------------------------------------------------------------------
19. 49 members attended the party. In that 22 are males, 17 are females. The shake hands between males, females, male and female. Total 12 people given shake hands. How many such kinds of such shake hands are possible?

Ans. is 12C2
------------------------------------------------------------------------------------------------------------
20. Entry ticket to an exhibition ranges from 1p to 31p. You need to provide exact change at the counter. You have 31p coin. In how many parts will u divide 31p so that u will provide the exact change required and carry as less coins as possible?

(a) 22
(b) 31
(c) 6
(d) 32

Ans. is 6
------------------------------------------------------------------------------------------------------------
21. There are 2 friends Peter and Paul. Peter age is twice as old as Paul when peter was as old as Paul is now. Sum of the present ages of Peter and Paul is 35.What is the present age of Peter?

Ans. is 20
------------------------------------------------------------------------------------------------------------
22. A lady took out jacket and gloves, which are available in blue 16, yellow 40 and red 36. Power goes off, she can distinguish between gloves and jacket but not in colors. What's the possibility their she will pick up pair of gloves of each color.

Ans. very easy..
------------------------------------------------------------------------------------------------------------
23. Two bowls are taken, one contains water and another contains tea. One spoon of water is added to second bowl and mixed well, and a spoon of mixture is taken from second bowl and added to the second bowl. Which statement will hold good for the above?

Ans. second liquid in first bowl is smaller than the first mixture in second bowl)
------------------------------------------------------------------------------------------------------------
24. Rearrange and categorize the word ‘IGTRE’?

Ans. Animal (TIGER)
------------------------------------------------------------------------------------------------------------
25. One grandfather has three grandchildren, two of their age difference is 3, eldest child age is 3 times youngest child’s age and eldest child’s age is two times of sum of other two children. What is the age of eldest child?

Ans. 18
------------------------------------------------------------------------------------------------------------
26. The ticket for a journey is in the range of 1 to 63 paise. You have 63 paise in your pocket and so on. and the question is You have to change the money into coins and all denominations are available at final. You have to buy the ticket and you should have at least one coin? (not same figures)

Ans. 64 (Just add 1 to highest i.e. 63+1)
------------------------------------------------------------------------------------------------------------
27. The sum of two numbers is given and product is also given find the square of difference of two numbers..

Ans. (a-b)2=a2+b2+2ab..
-----------------------------------------------------------------------------------------------------------
28. The dog and here are running, dog crosses the roads, rivers and different. Here start running after 2 hours of dog running, dog runs 30kmph in 6 hours then what is the average speed of here?
(values are not same)

Ans. 30*6/4
------------------------------------------------------------------------------------------------------------
29. There are some chocolates. A woman can eat 3chocolates and a man can eat 1 chocolate and a child can eat half chocolate. then 20 chocolates is divided in...

Ans. Go through the options( 5Woman, 3man, 4children).
------------------------------------------------------------------------------------------------------------
30. A water tank is filled in the way as 256,128,64,... th parts in every hour, then in how many hours the tank will filled?

Ans. 256,128,64,32,16,8,4,2,1 ( 9 hours) values are not same..
------------------------------------------------------------------------------------------------------------
31. The age of Ram and Sayam are in the ratio 5:6 and after 4 years their ratios are 7:8 then what is the present age of Sayam?

Ans. 12years (names and values may change)
------------------------------------------------------------------------------------------------------------
32.: There are two water tanks A and B, A is much smaller than B. While water fills at the rate of 1 liter every hour in A, it gets filled up like, 10, 20, 40,80, 160…..in tank B. 1/8 th of the tank B is filled in 22 hours. What is the time to fill the tank fully?

a) 26
(b) 25
(c) 5
(d) 27

Ans: 22+log 2 base 8=22+4=26

------------------------------------------------------------------------------------------------------------

33.: A sheet of paper has statements numbered from 1 to 70. For all values of n from 1 to 70. Statement n says 'At least n of the statements on this sheet are false.' Which statements are true and which are false?

(a) The even numbered statements are true and the odd numbered are false.
(b) The odd numbered statements are true and the even numbered are false.
(c) The first 35 statements are true and the last 35 are false.
(d) The first 35 statements are false and the last 35 are false.

Ans. c

Note: For this type of Questions, follow this:
--At least- I'st half are true, Last half are false
--Exactly- Last second one is true or (N-1)th Statement is true
--Almost- All are true.
------------------------------------------------------------------------------------------------------------
34. : Unnecessary data. A lady has fine gloves and hats in her closet- 18 blue- 32 red , 10 white , 25 yellow, 55 purple, 30 orange. The lights are out and it is totally dark in spite of the darkness. She can make out the difference between a hat and a glove. She takes out an item out of the closet only if she is sure that if it is a glove. How many gloves must she take out to make sure she has a pair of each color of blue, red, yellow?

(a) 59
(b) 8
(c) 50
(d) 42

Ans: a(32+25+2)
Note: For this type of questions:
Bigger+Middle+1 (Suppose 18, 32, 25 =32+25+1), If you do not find answer in options, choose the one closer those the answer you got.
------------------------------------------------------------------------------------------------------------
35. The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 12 such programmers take 12 minutes to write 12 lines of code in total. How long will it take 72 programmers to write 72 lines of code in total?
For this type question you should follow d step of basic math that will helpful you get enough time from  that.
12 prog 12 line 12 min
1 prog 12 line 12*12
1 1 12*12/12
72 1 12*12/(12*72)
72 72 12*12*72/(12*72)

Ans:12
Note: This question appears 3 times in our question but app is different please follow basic rule think it it is very very easy.
------------------------------------------------------------------------------------------------------------
36.: 12 people {a1, a2, …, a12} meet and shake hands in a circular fashion. In other words, there are totally 36 handshakes involving the pairs, {a1, a2}, {a2, a3}, …, {a11, a12}, {a12, a1}. Then size of the smallest set of people such that the rest have shaken hands with at least one person in the set is

(a) 12
(b) 4
(c) 18
(d) 11

Ans. B (N/3)
------------------------------------------------------------------------------------------------------------
37.: 10 suspects are rounded by the police and questioned about a bank robbery. Only one of them is guilty. The suspects are made to stand in a line and each person declares that the person next to him on his right is guilty. The rightmost person is not questioned. Which of the following possibilities are true?
A. All suspects are lying.
B. leftmost suspect is innocent.
C. leftmost suspect is guilty
(a) A only
(b) A or C
(c) A or B
(d) B only
Ans. c
Note: Remember it I don't know the logic
------------------------------------------------------------------------------------------------------------
38.: Alok and Bhanu play the following min-max game. Given the expression N = 15 + X*(Y – Z) Where X, Y and Z are variables representing single digits (0 to 9), Alok would like to maximize N while Bhanu would like to minimize it. Towards this end, Alok chooses a single digit number and Bhanu substitutes this for a variable of her choice (X, Y or Z). Alok then chooses the next value and Bhanu, the variable to substitute the value. Finally Alok proposes the value for the remaining variable. Assuming both play to their optimal strategies, the value of N at the end of the game would be?

Ans. 15+18 =33
Note: For this type of questions:
x+y-z=11
x-y-z=2
x*(y+z)=18
------------------------------------------------------------------------------------------------------------
39.  How many four digit numbers can be formed using the digits 1, 2, 3, 4, 5 (but with repetition) that are divisible by 4? Can you help Alok find the answer?
(a) 100
(b) 125
(c) 75
(d) 85
Ans:. 5^n-1= 5^4-1=125, n= no of digits

------------------------------------------------------------------------------------------------------------
40 Given a collection of points P in the plane , a 1-set is a point in P that can be separated from the rest by a line, .i.e the point lies on one side of the line while the others lie on the other side. The number of 1-sets of P is denoted by n1(P). The minimum value of n1(P) over all configurations P of 5 points in the plane in general position (.i.e no three points in P lie on a line) is

(a) 3
(b) 5
(c) 2

Ans. Will be same as no of points in the plane, IE 5

Monday, 11 June 2012

TCS placement paper (Technical)


Interview Question 1 :

Some directives are used to turn ON and OFF compiler specific features. For example, a compiler could be able to perform loop optimization and this could be invoked via these directives. What are these directives called ?


Answer : Pragma Directive. (This is bit tough question which you might not be aware of.)
------------------------------------------------------------------------------------------------------------
Interview Question 2 :

#ifndef preprocessor directive can be used to avoid multiple inclusions of a header file. State True or False.

Answer: Yes, it is True. For example the below code includes "headerfile.h" only if it is not already included.

#ifndef headerfile.h
#define headerfile.h
#endif
------------------------------------------------------------------------------------------------------------
Interview Question 3

Name two different types of polymorphism ?

Answer:
This is a prominent question from OOPS concepts. Two types of polymorphism are a) Overloading and b) Overriding
------------------------------------------------------------------------------------------------------------
Interview Question 4

Define Storage Classes and Name four types of storage classes ?

Answer:
Storage classes are specifiers define lifetime and scope of variables. Four types of Storage classes include Auto, Register, Extern and Static.
------------------------------------------------------------------------------------------------------------
Interview Question 5 :

What is the prime difference between While and Do While Loop ?

Answer :

Though while and do-while are loop statements, in Do While it is assured that the statements within the loop will be executed at least once (even if the condition fails.)
------------------------------------------------------------------------------------------------------------
Interview Question 6 :

2) What is the difference between a = ++b and a = b++ ?

Answer :

The first statement a = ++b can be broken down into two statements b = b + 1 followed by a = b. Hence b will be incremented first and will be assigned to a. Hence values of a and b will be same at the end.

The second statement a = b++ can be broken down into two statements a = b followed by b = b + 1. Hence b will be assigned to a. Only after this assignment b will be incremented. Hence values of a and b will be different at the end.
------------------------------------------------------------------------------------------------------------
Interview Question 7 :

3) A C program is compiled into native (binary) code by the compiler. Similary what will be generated out of JAVA program source by JAVA compiler ?

Answer :

JAVA program will get compiled into bytecode instead of native (binary) code.
------------------------------------------------------------------------------------------------------------
Interview Question 8

Amongst calloc and malloc subroutines, which one of them will initialize the allocated memory to zero.


Answer:
This question would require you to know basics of calloc and malloc memory allocating subroutines (or functions).Its calloc with does initialize allocated memory to zero.
------------------------------------------------------------------------------------------------------------
Find the output of the following .

9) main()
 {
  float me = 1.1;
   double you = 1.1;
     if(me==you)
         printf("I love U");
       else
   printf("I hate U");
}

a) I love U
b) I hate U
c) Both a) & b)

Answer: I hate U
------------------------------------------------------------------------------------------------------------
10) main()
{
   static int var = 5;
         printf("%d ",var--);
     if(var)
  main();
}

a) 12345
b) 54321
c) 15243

Answer: 5 4 3 2 1
------------------------------------------------------------------------------------------------------------
11) main()
{
   int c[ ]={2.8,3.4,4,6.7,5};
      int j,*p=c,*q=c;
        for(j=0;j<5;j++) {
           printf(" %d ",*c);
           ++q;
}
        for(j=0;j<5;j++)
{
   printf(" %d ",*p);
  ++p;
}
}

a) 2 2 2 2 2 4 2 3 5 5
b) 2 2 2 2 2 2 5 4 6 3
c) 2 2 2 2 2 2 3 4 6 5

Answer  2 2 2 2 2 2 3 4 6 5
------------------------------------------------------------------------------------------------------------
12) main()
{
    extern int i;
     i=20;
      printf("%d",i);
}

a) compiler error
b) Linker error
c) Runtime error

Answer  compiler error

------------------------------------------------------------------------------------------------------------
13) Which is the term used for information hiding in OOPS?

a) abstraction
b) encapsulation
c) polymorphism

Answer encapsulation
------------------------------------------------------------------------------------------------------------
14)  Distributed systems are used for

a) Resource sharing
b) Load sharing
c) Fault tolerance
d) All the  above

Answer  All the above
------------------------------------------------------------------------------------------------------------
15) Which of the following features is supported by Object Oriented Programming?

a) Abstraction
b) Encapsulation
c) Inheritance
d) All the above

Answer: All the above
------------------------------------------------------------------------------------------------------------
16) Which of the following statements is true considering OOP (Object Oriented Programming)?

a) State defines the attribute of an object
b) Behaviour defines the attribute of an object
c) State defines the functions to modify the behaviour of an object
d) none of the above

Answer: 1