.
  Vyom World.com . Let's Touch the Sky Together!  
.

Home
VyomWorld.com Home
Interview Questions
VyomLinks.com Home
JobsAssist.com Home
Vyom Network
Contact Us
Jobs & Careers
Resume Submitter
Placement Papers
IT Companies Directory
Computer Jobs
Interview Questions
Online Exams
Vyom Career eMag.
Fun
Send FREE SMS!
SMS Jokes
Source Codes Library
Source Codes Home
ASP Source Codes
C Source Codes
C++ Source Codes
COBOL Source Codes
Java Source Codes
Pascal Source Codes
Submit Source Codes
GATE
GATE an Overview
GATE Preparation
Study Materal
GRE
GRE an Overview
GRE Questions
GRE Preparation
GRE Universities
TOEFL Preparation
TOEFL Resources
GMAT Preparation
GMAT Resources
MBA Preparation
MBA Resources
Networking Concepts
Networking Concepts
Testing Preparation
Testing Resources
Webmasters
Free Traffic Builder
Webmaster Articles
Web Hosting
Tutorials
Hardware Tutorial
1500 Free eBooks New!
Get 30,000 Interview Questions & Answers in an eBook.

Interview Success Kit - Get Success in Job Interviews





Interview Success Kit - Get Success in Job Interviews Interview Success Kit - 30,000 Interview Que. & Ans.


Home » Placement Papers » TCS Placement Papers » TCS Placement Paper 8

New Click here to Download 2024 Latest placement papers of this company New


TCS Placement Paper 8


Advertisements
Advertisements


 


TCS C PAPER-2003

1. fn(int n,int p,int r)
{
static int a=p;
switch(n);
{
case4: a+ = a*r;
case3: a+ = a*r;
case2: a+ = a*r;
case1: a+ = a*r;
}
}
The aboue programme calculates
a.Compound interest for 1 to 4 years
b.Amount of Compound interest for 4 years
c.Simple interest for 1 year
d.Simple interest for 4 year
2. int a[50], *pa;
pa = &a[0];
In order to access 5th element, find the incorrect one
a.pa[5]
b.a[5]
c. *(*(pa+5))
d.*(a+5)
3. Regarding the variables select incorrect one
Ans. Auto variables select incorrect one
4. Write onest equivalent to the following two
x + sqrt(a);
return(x);
Choose one of the alternatives
a.printf("%d",sqrt(a));
b.return(sqrt(a));
c.printf("sqrt(a)");
b.return(a*a*a);
5. Which of the following is not an infinite loop
a.while(i){....}
b.do{......} while(i);
c.for(ii)
d.#define TRUE 0
while(TRUE){....};
6. What does the following function print ?
func(int i)
{ if (i%2)
return 0;
else
return 1;
}
main()
{
int i=3;
i=func(i);
i=func(i);
printf("%d",i);
}
a.2 b.3 c.1 d.0
7.to10.th bit: Choose one of the alternatives for the following
a.float b.int c.char d.string
7.'9'
8."1e02"
9.10e03
10.15
11. Consider the following structure
struc num_name{int no;
char name[25];}
struc num_name n1[]={{12,"find"},{15,"matrix"},{8,"pick"}};
printf("%d%d",n1[2],no,(*(n1+2)),no+1);
What does the above st. do ?
a. 8,9 b. 8,8 c. 9,9 d. 8,unpredictable value
12. for(i=0; i!=10; i+=2)
printf(".....");
How many time will it execute ?
a.10 b.0 c.5 d.not even once
13. 20 bytes are allocated to a string s
s="ENIRANC B"
l = strlen(s);
then i = ?
a.20 b.22 c.21 d.8
14. y=5;
if ( x == 10)
else if ( x == 9)
else y=3;
then y = ?
a.8 b.7 c.5 d.0
15. Which is incorrect ?
a.a+=b;
b.a*=b;
c.a>=b;
d.a**=b;
16. operator for 
a. not available b. ** c. ^ d. %
17. cond1? cond2 ? cond3 ? : exp2 : exp2 : exp3 :exp4
the equvalent set of statements to the above is 
a. b. c. d.
18. valuue stored in a variable of type double is 
a. can be less athan int or float or long
b. always > int
c. always < long
d. always > float
19. Thetre are 100 functions and first 50 are in file 1.c and rest
in file 2.c then they must be declared in file 1.c as 
a. auto 
b. global 
c. static 
d. external
20. struct out {
struct in{ char c;int d;}s1,*p1;
}a1, *pa1;

pa1 = &a1;
a1.p1 = &s1;
Which is incorrect?
a. a1.p1->c 
b. pa1->p1->c 
c. a1->p1 
d. a1.s1.c
21. if a=z then value a <<1 is ?
a. 3 b.4 c.2 d.1
22. #define prod(a,b) a*b
x = 2; y = 2;
prod(x+2,y+1) = ?
a. 6 b.12 c. 7 d.16
23. int sum = 1;
switch (2)
{
case 2: sum sum+2;
case 3: sum*=2; break;
defdault: sum = 0;
}
which is the value of sum ?
a. 2 b. 6 c. 1 d. 0
24. Which one of the following is invalid?
a.if(a==1) b. if(a != 3)
c. if(a<b) then d. if(a<0)
25. int x = 5, *p;
p = &x;
printf("%d",++ *p); what is the output?
a. 2 b. 6 c.1 d. 0
26. unsigned int i = 10;
while (i>=0) {---------; i--}
How many times the loop is executed?
a.10 b.9 c. infinite d.11
27. pick the odd man out 
a. malloc 
b. calloc 
c. realloc 
d. free
28. pick the odd man out
a. c = fgetc(stdin)
b. c= getch();
c. -----
d. gets(s);
29. Which is incorrect regarding a recursive function
a. does not return a value at all 
b. calls itself 
c. equals to a loop
d. has a termination condition
30. Write an expressionfor " either x lies in the 
range of 10 to 5o or y = 0"
31. x = 7; y= 0;
if(x ==6) y =7;
else y = 1;
what is the vcalue of y?
32. Choose the incorrect one
auto variables within a function are 
a. global 
b. local 
c. its type must be declared before using 
d. -----
33. The delimitor for statements is 
a. semicolon 
b. colon




QUANTITATIVE APTITUDE SECTION


1. Two pencils costs 8 cents, then 5 pencils cost how much

Sol: 2 pencils � 8 cents => 1 pencil � 4 cents

Therefore 5 pencils cost = 5 * 4 = 20 cents

2. A work is done by two people in 24 min. one of them can do this work a lonely 
in 40 min. how much time required to do the same work for the second person.

Sol: (A+B) can do the work in = 1/24 min.

A alone can do the same work in = 1/40 min.

B alone can do the same work in = (A+B)�s � A�s = 1/24 � 1/40 = 1/60

Therefore, b can do the same work in = 60 min

3.A car is filled with four and half gallons of oil for full round trip. Fuel is taken 
1/4 gallon more in going than coming. What is the fuel consumed in coming up?

Sol Before the trip, car is filled with = 4 � gallon of oil

Let �X� be the quantity of fuel consumed for the trip in one direction

The fuel consumed while going = X + � 

The fuel consumed while coming = X

Therefore, the fuel consumed for the trip = (X + �) + X = 4 � 

� 2X + � = 4 � => 2X = 4 � - � => 2X = 4 � => X= 2. approx

Therefore the fuel consumed while coming = 2 gallon

4. Low temperature at the night in a city is 1/3 more than 1/2 high as higher 
temperature in a day. Sum of the low temperature and highest temp. is 100 
degrees. Then what is the low temp? 

Sol: 40 deg.





5. A person, who decided to go to weekend trip should not exceed 8 hours 
driving in a day. Average speed of forward journey is 40 m/h. Due to traffic 
in Sundays, the return journey average speed is 30 m/h. How far he can select 
a picnic spot?

a) 120 miles
b) Between 120 and 140 miles
c) 160 miles

Answer: 120 miles

6. A salesperson multiplied a number and got the answer 3, instead of that number divided by 3.What is the answer he actually has to get?

Sol: (1/3) *1 * 3 = 3, so number = 1

Divided by 3 

Answer: 1/3.


7. A ship started from port and moving with I miles per hour and another ship started from L and moving with H miles per hour. At which place these two ships meet?

|----|----|----|----|----|----|
port G H I J K L

Sol: Answer is between I and J and close to J or (L*I*H)/(H+I)


8. A building with height D shadow up to G. A neighbor building with what 
height shadows C feet.

|----|----|----|----|----|----|----|
A B C D E F G H

Sol: B Ft. or CD/G

9. A person was fined for exceeding the speed limit by 10mph. Another person 
was also fined for exceeding the same speed limit by twice the same. If the 
second person was traveling at a speed of 35 mph, find the speed limit.

Sol: Let �x� be the speed limit 

Person �A� was fined for exceeding the speed limit by = 10mph
Person �B� was fined for exceeding the speed limit by = twice of �A� 
= 2*10mph=20mph
given that the second person was traveling at the speed of 35mph

=> 35mph � 20mph = 15mph

Therefore the speed limit is =15 mph


10.A bus started from bus stand at 8.00am, and after 30 minutes staying at 
destination, it returned back to the bus stand. The destination is 27 miles from 
the bus stand. The speed of the bus is 18mph. In return journey bus travels 
with 50% fast speed. At what time it returns to the bus stand? 

Sol: 11.00am

11.In a mixture, R is 2 parts S is 1 part. In order to make S to 25% of the mixture, 
how much r is to be added?

Sol: One Part

12. Wind flows 160 miles in 330 min, for 80 miles how much time required.

Sol: 

13. With 4/5 full tank vehicle travels 12 miles, with 1/3 full tank how much 
distance travels 

Sol: ( 5 miles )


14. Two trees are there. One grows at 3/5 of the other in 4 years, total growth of 
trees is 8 ft. what growth will smaller tree will have in 2 years 

Sol: ( < 2 ft. )

15. A storm will move with a velocity of towards the center in hours, at the same 
rate how much far will it move in hrs. 

Sol: ( but the answer is 8/3 or 2 2/3 )





1. In a two-dimensional array, X (9, 7), with each element occupying 4 bytes of memory, with the address of the first element X (1, 1) is 3000; find the address of X (8, 5). 
Ans: 3212

2. In the word ORGANISATIONAL, if the first and second, third and forth, forth and fifth, fifth and sixth words are interchanged up to the last letter, what would be the tenth letter from right? Ans:I

3. What is the largest prime number that can be stored in an 8-bit memory? Ans : 251

4. Select the odd one out�..a. Java b. Lisp c. Smalltalk d. Eiffel.
5. Select the odd one out a. SMTP b. WAP c. SAP d. ARP
6. Select the odd one out a. Oracle b. Linux c. Ingress d. DB2
7. Select the odd one out a. WAP b. HTTP c. BAAN d. ARP
8. Select the odd one out a. LINUX b. UNIX c. SOLARIS d. SQL SEVER
9. Select the odd one out a. SQL b. DB2 c. SYBASE d. HTTP

10. The size of a program is N. And the memory occupied by the program is given by M = square root of 100N. If the size of the program is increased by 1% then how much memory now occupied? Ans: 0.5%(SQRT 101N)

11. A man, a woman, and a child can do a piece of work in 6 days. Man only can do it in 24 days. Woman can do it in 16 days and in how many days child can do the same work? Ans: 16
12. In which of the system, decimal number 184 is equal to 1234? Ans: 5

13. Find the value of the 678 to the base-7. Ans: 1656
14. Number of faces, vertices and edges of a cube Ans: 6 8 12
15. Complete the series 2, 7, 24, 77,__ Ans: 238

16. Find the value of @@+25-++@16, where @ denotes "square" and + denotes "square root". Ans: 621

17. Find the result of the following expression if, M denotes modulus operation, R denotes round-off, T denotes truncation: M(373,5)+R(3.4)+T(7.7)+R(5.8) Ans:19

18. If TAFJHH is coded as RBEKGI then RBDJK can be coded as? Ans: qcckj

19. G(0)= -1, G(1)=1, G(N)=G(N-1) - G(N-2), G(5)= ? Ans: - 2
20. What is the max possible 3 digit prime number? Ans: 997

21. A power unit is there by the bank of the river of 750 meters width. A cable is made from power unit to power plant opposite to that of the river and 1500mts away from the power unit.The cost of the cable below water is Rs.15/- per meter and cost of cable on the bank is Rs.12/-per meter. Find the total of laying the cable. Ans : 1000 (24725-cost)

22. The size of a program is N. And the memory occupied by the program is given by M = square root of 100N. If the size of the program is increased by 1% then how much memory now occupied? Ans:0.5%(SQRT 101N)

23. In Madras, temperature at noon varies according to -t^2/2 + 8t + 3, where t is elapsed time. Find how much temperature more or less in 4pm to 9pm. Ans:At 9pm 7.5 more

24. The size of the bucket is N kb. The bucket fills at the rate of 0.1 kb per millisecond. A programmer sends a program to receiver. There it waits for 10 milliseconds. And response will be back to programmer in 20 milliseconds. How much time the program takes to get a response back to the programmer, after it is sent? Ans: 30

25. A man, a woman, and a child can do a piece of work in 6 days. Man only can do it in 24 days. Woman can do it in 16 days and in how many days child can do the same work? Ans: 16

26. If the vertex (5,7) is placed in the memory. First vertex (1,1) `s address is 1245 and then address of (5,7) is ---------- Ans: 1279

27. Which of the following are orthogonal pairs? 
a. 3i+2j b. i+j c. 2i-3j d. -7i+j Ans: a, c

28. If VXUPLVH is written as SURMISE, what is SHDVD? Ans: PEASE

29. If A, B and C are the mechanisms used separately to reduce the wastage of fuel by 30%, 20% and 10%.What will be the fuel economy if they were used combined.
Ans: 20%

30. What is the power of 2? a. 2068 b.2048 c.2668 

31. Complete the series. 3, 8, --, 24, --, 48, 63. Ans: 15.35

32. Complete the series. 4, -5, 11, -14, 22, -- Ans: -27 

33. A, B and C are 8 bit no's. They are as follows:
A -> 1 1 0 1 1 0 1 1
B -> 0 1 1 1 1 0 1 0
C -> 0 1 1 0 1 1 0 1
Find ((A-B) u C)=? Hint: 109�. A-B is {A} - {A n B}

34. A Flight takes off at 2 A.M from northeast direction and travels for 11 hours to reach the destination, which is in northwest direction. Given the latitude and longitude of source and destination. Find the local time of destination when the flight reaches there? Ans: 7 am

35. A can copy 50 papers in 10 hours while both A & B can copy 70 papers in 10 hours. Then for how many hours required for B to copy 26 papers? Ans: 13

36. A is twice efficient than B. A and B can both work together to complete a work in 7 days. Then find in how many days, A alone can complete the work? Ans: 10.5

37. A finish the work in 10 days. B is 60% efficient than A. So how many days do B takes to finish the work? Ans :100/6

38. A finishes the work in 10 days & B in 8 days individually. If A works for only 6 days then how many days should B work to complete A's work? Ans: 3.2 days

39. Given the length of the 3 sides of a triangle. Find the one that is impossible? (HINT: sum of smaller 2 sides is greater than the other one, which is larger)

40. Find the singularity matrix from a given set of matrices? (Hint det(A)==0))

41. A 2D array is declared as A[9,7] and each element requires 2 byte. If A [1,1] is stored in 3000. Find the memory of A[8,5] ? Ans: 3106

42. Sum of slopes of 2 perpendicular st.lines is given. Find the pair of lines from the given set of options, which satisfy the above condition?

43. (a) 2+3i (b)1+i (c) 3-2i (d) 1-7i .Find which of the above is orthogonal. Ans : a,c

44. (Momentum*Velocity)/(Acceleration * distance). Find units. Ans: mass

45. The number 362 in decimal system is given by (1362) x in the X System of numbers find the value of X a} 5 b) 6 c) 7 d) 8 e) 9

46. Given $ means Tripling and % means change of sign then find the value of $%$6-%$%6

47. My flight takes of at 2am from a place at 18N 10E and landed 10 Hrs later at a place with coordinates 36N70W. What is the local time when my plane landed?
6:00 am b) 6:40am c) 7:40 d) 7:00 e) 8:00
(Hint: Every 1 deg longitude is equal to 4 minutes. If west to east add time else subtract time)

48. Find the highest prime number that can be stored in an 8 bit Computer?

49. Which of the following set of numbers has the highest Standard deviation?
a)1,0,1,0,1,0 b) -1, -1, -1, -1, -1, -1
c)1,1,1,1,1,1 d) 1,1,0, -1,0, -1


New Click here to Download 2024 Latest placement papers of this company New




 


.

Recently Updated: New Placement Papers added.
Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Programming & Source Codes | GRE Preparation | Jobs, Discussions | Software Listing | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | International Business Information | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | FAQs | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Excellent Mobiles | Software Testing | Interview Questions | Freshers Jobs | Server Insiders | File Extension Directory

Copyright ©2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy