Sample Paper for Placement in TCS
Sample Paper for Placement In TCS with Answers and Solutions:-
1. What is the output of the program?
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j=20;
clrscr();
for(i=1;i<3;i++)
{
printf(“%d,”,i);
continue;
printf(“%d”,j);
break;
}
getch();
}
A. 1,20
B. 1,20,1,20
C. 1,2
D. 1,2,20,20
Ans: C
2. What is the output of the program?
void main()
{
int i,j,k;
i=2;
j=4;
k=i++>j&2;
printf(“%d\n”,k);
if(++k && ++i<–j|| i++)
{
j=++k;
}
printf(” %d %d %d”,i,-j–,k);
getch();
}
A) 4,-3,2. B) 5,-3,2 C) 4,-2,2 D) 5,-2,2
Ans: D
3.What is the maximum number of half-pint bottles of cream that can be filled with a 4-gallon can of cream(2 pt.=1 qt. and 4 qt.=1 gal)?
A.16
B.24
C.30
D.64
Ans. D
4.If the operation,^ is defined by the equation x ^ y = 2x + y,what is the value of a in 2 ^ a = a ^ 3?
A.0
B.1
C.-1
D.4
Ans. B
5. A company contracts to paint 3 houses. Mr. Brown can paint a house in 6 days while Mr. Black would take 8 days and Mr. Blue 12 days. After 8 days Mr. Brown goes on vacation and Mr. Black begins to work for a period of 6 days. How many days will it take Mr. Blue to complete the contract?
A. 7
B. 8
C. 11
D. 12
Ans. C
6. 2 hours after a freight train leaves Delhi a passenger train leaves the same station traveling in the same direction at an average speed of 16 km/hr. After traveling 4 hrs the passenger train overtakes the freight train. The average speed of the freight train was?
A. 30
B. 40
C.58
D. 60
Ans. B
7. A man fixed an appointment to meet the manager, Manager asked him to come two days after the day before the day after tomorrow. Today is Friday. When will the manager expect him? (repeated from previous papers)
Ans: Monday
8. if a person is sitting in a exam having 30 questions (objective type) the examiner use the formula to calculate the score is S=30+4c-w here c is number of correct answer and w is number of wrong answer , the examiner find the score is more than 80, tell how may questions are correct ? if the score is little less but still more than 80 then u wont be able to answer.
Ans:- 16
9. A plane goes from Chicago to Columbus and then comes back. It takes the same time to travel in either ways. It leave Chicago early in the morning 0644 LOCAL TIME and reaches the destination Columbus at 0849 LOCAL TIME. In the same evening it leave Columbus at 1625 hrs LOCAL TIME and reaches the destination at 1638 LOCAL TIME. Find the time that the plane takes to travel either way?
Ans: 69 mins
10. Which of the following involves context switch,
(a) system call (b) privileged instruction) floating point exception) all the above (e) none of the above
Ans: (a)
11. In OST, terminal emulation is done in
(a) sessions layer b) application layer c) presentation layer (d) transport layer
Ans: (b)
12. What is the output of the following program
main()
{
int a=10;
int b=6;
if(a=3)
b++;
printf(“%d %d\n”,a,b++);
}
a) 10,6 b) 10,7 c) 3,6 d) 3,7 e) none
Answer : d) 3,7
13. What can be said of the following program?
main()
{
enum Months {JAN =1,FEB,MAR,APR};
Months X = JAN;
if(X==1)
{
printf(“Jan is the first month”);
}
}
a) Does not print anything
b) Prints : Jan is the first month
c) Generates compilation error
d) Results in runtime error
Answer: b) Prints : Jan..
14. Working independently, Tina can do a certain job in 12 hours. Working independently, Ann can do the same job in 9 hours. If Tina Works independently at the job for 8 hours and then Ann works independently, how many hours will it take Ann to complete the remainder of the jobs?
(A) 2/3
(B) 3/4
(C) 1
(D) 2
(E) 3
Ans :E)3
15. A decorator bought a bolt of d m number of red chips in any one stack ?
(A) 7
(B) 6
(C) 5
(D) 4
(E) 3
Ans :C) 5
16. You r given two statements
a=(10.15);
b=10,15;
if they are executed what is the output printf(“%d%d”,a,b);
a)10,15
b)15,10
c)10,10
d)15,15
Ans : a)10,15
17. if a=2,b=4,c=5 then a+b c c a+b
a) 1
b) 11/30
c) 0
d) -11/30
e) -1
Ans: b
18. 10^2(10^8+10^8) = 10^4
a) 2(10)^4
b) 2(10)^6
c) 10^8
d) 2(10)^8
e) 10^10
Ans: b
19. Working independently, Tina can do a certain job in 12 hours. Working independently, Ann can do the same job in 9 hours. If Tina Works independently at the job for 8 hours and then Ann works independently, how many hours will it take Ann to complete the remainder of the jobs?
(A) 2/3
(B) 3/4
(C) 1
(D) 2
(E) 3
Ans :E)3
20. A decorator bought a bolt of d m number of red chips in any one stack ?
(A) 7
(B) 6
(C) 5
(D) 4
(E) 3
Ans :C) 5
21 . main()
{
int var=25,varp;
varp=&var;
varp=10;
fun(varp);
printf(%d%d”,var,varp);
a) 45,45 b) 55,55 c) 20,55;
Ans: a) 45,45
22. u r given two statements
a=(10.15);
b=10,15;
if they are executed what is the output printf(“%d%d”,a,b);
a)10,15 b) 15,10 c) 10,10 d) 15,15
Ans: a)10,15
23 .if a=2,b=4,c=5 then a+b c c a+b
a) 1
b) 11/30
c) 0
d) -11/30
e) -1
Ans: b) 11/30
24 .10^2(10^8+10^8) = 10^4
a) 2(10)^4
b) 2(10)^6
c) 10^8
d) 2(10)^8
e) 10^10
Ans: b) 2(10)^6
25. 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) 12
26. 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
27. 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.]
28. 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
29. 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
30. 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.]
31. 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]
32. 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]
33.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)
34. 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
35. 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)**
36.Which Is The Smallest No Divides 2880 And Gives A Perfect Square?
a) 1 b) 2 c) 5 d) 6
Ans: C
37. 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
38. Rearrange And Categorize The Word ‘Rapeteka’?
Ans: Bird
39. 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.
40. 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.]
41. 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
Ans: C) Thursday
[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.]
42. 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
43. (1/2) Of A Number Is 3 Times More Than The (1/6) Of The Same Number?
Ans: 9
44. 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
45. 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 X and Y, X 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 X-Y game?
Ans: (2/3)^2+(1-2/3)^2
46. A circular dart board of radius 1 foot is at a distance of 20 feet from you. You throw a dart at it and it hits the dartboard at some point X in the circle. What is the probability that X is closer to the center of the circle than the periphery?
Ans: pi(r/2)^2/pi(r)^2
47. On planet Corba, a solar blast has melted the ice caps on its equator. 8 years after the ice melts, tiny plantoids called echina start growing on the rocks. echina grows in the form of a circle and the relationship between the diameter of this circle and the age of echina is given by the formula d = 4 * v (t – 8 ) for t = 8, where d represents the diameter in mm and t the number of years since the solar blast. If you record the radius of some echina at a particular spot as 8mm. How many years back did the solar blast occur?
Ans: simply put d=2*r
48. Given 3 lines in the plane such that the points of intersection form a triangle with sides of length 20, 20 and 30, What is the number of points equidistant from all the 3 lines?
Ans: 4 for 3line
[if question say line segment then answer will be 1.]
49. 36 people {a1, a2, …, a36} meet and shake hands in a circular fashion. In other words, there are totally 36 handshakes involving the pairs, {a1, a2}, {a2, a3}, …, {a35, a36}, {a36, a1}. Find the size of the smallest set of people such that the rest have shaken hands with at least one person in the set.
Ans: simply put n/3=36/3=12
50. After the typist writes 12 letters and addresses 12 envelopes, he inserts 1 letter per envelope randomly into the envelopes. What is the probability that exactly 1 letter is inserted in an improper envelope?
Ans: 0
51. 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). Find the maximum value of n1(P) over all configurations P of 19 points in the plane.
Ans: 19
52. A sheet of paper has statements numbered from 1 to 35. For all values of n from 1 to 35, statement n says “At most n of the statements on this sheet are false”. Which statements are true and which are false?
Ans. For this type of question
At least-half f the statements are true and remains false.
Exactly-n-1 statements are true and remains false
Almost-all statement r true.
53. A and B play the following min-max game. Given the expression
N = 12 + X*(Y – Z)
where X, Y and Z are variables representing single digits (0 to 9), “A” would like to maximize N while “B” would like to minimize it. Towards this end, “A” chooses a single digit number and “B” substitutes this for a variable of her choice (X, Y or Z). “A” then chooses the next value and “B”, the variable to substitute the value. Finally “A” 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. x-y-z=2
x+y-z=11
x*(y-z)=x*(y+z)=18
54. 1/3 of a number is 6 more than 1/6 of the same number. What is the number?
Ans. 36
55. 20 people meet and shake hands. The maximum number of hand shakes possible if there is to be no ‘cycle’ of handshakes is( a cycle of handshake is a sequence of people a1,a2, …ak) such that people(a1,a2),(a2,a3)…(a(k-1),ak),(a2,a1) shake hand is
Ans. for cyclic-(n-1)
for non-cyclic-(nc2)
56. Find the product of the prime numbers between 1-20
ans.9699690
57. 4. 2,3,6,7— using these numbers form the possible four digit numbers that are divisible by 4.
Ans.8
58. Two trains are traveling at 18kmph and are 60 km apart. There is fly in the train. it flies at 80kmph. It flies and hits the second train and then it starts to oscillate between the two trains. At one instance when the two trains collide it dies. Distance traveled by the fly when both trains collide is
Ans.—12km
59. there are 1000 doors that are of the open-close type. When a person opens the door he closes it and then opens the other. When the first person goes he opens-closes the doors ion the multiples of 1 i.e., he opens and closes all the doors. when the second goes he opens and closes the doors 2, 4 6 8 respectively. Similarly when the third one goes he does this for 3 6 9 1 2 15th doors resly. Find number of doors that are open at last.
Ans: square numbers
60. In a pile of 10 books, there are 3 of History, 3 of Hindi, 2 of mathematics and 2 of English. Taking from above, there is an English book between a history and mathematics book, a history book between a mathematics and an English book, a Hindi book between an English and a mathematics book, a mathematics book between two Hindi books and two Hindi books between a Mathematic and a History book. Book of which subject is at the sixth position from top ?
A. English
B. Hindi
B. Mathematics
C. History
Ans: B
61.There are 9 balls of this one is defective. Find the minimum no. of chances of finding the defective one.
Ans: 3times
62. In A tribal group two groups live in different climatic conditions. Ear Sensitivity is tested and found that one has more when compared to other. What is the reason.
Ans. Depends on the physical place and condition he is living
Tell us Your Queries, Suggestions and Feedback
One Response to Sample Paper for Placement in TCS
« Placement Criteria for Mindtree with Placement Papers ABB technical questions with answers »
TCS is an Indian topmost and placed among top 10 technology company in the world. TCS by getting 40 years of experience add real value to global organizations through domain expertise plus solutions with proven success in the field and world-class service IT services company, business solutions and outsourcing services company .
If u r hvn dream 2 join TCS go thru ths sample paper and more from internet.