|
|
A Unit of Aim Clear Technologies Ltd.
Advertise with us
 |
|
|
Page 1 of 1
|
[ 7 posts ] |
|
neha
Marketing Executive
Joined:
Mon Aug 24, 2009 10:57 pm
Beans: 767
In Bank: 10965
College: IET
Degree: B.E
Position: Teacher
|
|
Sat Sep 19, 2009 3:15 pm
|
Post subject: TCS (Tata Consultancy Services) Placement Paper
This test consists of 50 questions.The Set Code for this paper is D. 1. The C language terminator is
(a) semicolon (b) colon (c) period (d) exclamation mark
2. What is false about the following -- A compound statement is
(a) A set of simple statments (b) Demarcated on either side by curly brackets (c) Can be used in place of simple statement (d) A C function is not a compound statement.
3. What is true about the following C Functions
(a) Need not return any value (b) Should always return an integer (c) Should always return a float (d) Should always return more than one value
4. Main must be written as
(a) The first function in the program (b) Second function in the program (c) Last function in the program (d) Any where in the program
5. Which of the following about automatic variables within a function is correct ?
(a) Its type must be declared before using the variable (b) Tthey are local (c) They are not initialised to zero (d) They are global
6. Write one statement equivalent to the following two statements
x=sqr(a); return(x);
Choose from one of the alternatives
(a) return(sqr(a)); (b) printf("sqr(a)"); (c) return(a*a*a); (d) printf("%d",sqr(a));
7. Which of the following about the C comments is incorrect ?
(a) Ccommentscan go over multiple lines (b) Comments can start any where in the line (c) A line can contain comments with out any language statements (d) Comments can occur within comments
8. What is the value of y in the following code? x=7; y=0; if(x=6) y=7; else y=1;
(a) 7 (b) 0 (c) 1 (d) 6
9. Read the function conv() given below conv(int t){ int u; u=5/9 * (t-32); return(u); } What is returned
(a) 15 (b) 0 (c) 16.1 (d) 29
10. Which of the following represents true statement either x is in the range of 10 and 50 or y is zero
(a) x >= 10 && x <= 50 || y = = 0 (b) x<50 (c) y!=10 && x>=50 (d) None of these
11. Which of the following is not an infinite loop ?
(a) while(1)\{ ....}
(b) for(;;) { ... }
(c) x=0; do{ /*x unaltered within the loop*/ .....} while(x = = 0);
(d) # define TRUE 0 ... while(TRUE){ ....}
|
|
|
|
neha
Marketing Executive
Joined:
Mon Aug 24, 2009 10:57 pm
Beans: 767
In Bank: 10965
College: IET
Degree: B.E
Position: Teacher
|
|
Sat Sep 19, 2009 3:15 pm
|
Post subject: Re: TCS (Tata Consultancy Services) Placement Paper
12. What does the following function print? func(int i) { if(i%2)return 0; else return 1;} main() { int =3; i=func(i); i=func(i); printf("%d",i); }
(a) 3 (b) 1 (c) 0 (d) 2
13. How does the C compiler interpret the following two statements p=p+x; q=q+y;
(a) p=p+x; q=q+y (b)p=p+xq=q+y (c)p=p+xq; q=q+y (d)p=p+x/q=q+y
For questions 14,15,16,17 use the following alternatives
a.int b.char c.string d.float
14. '9'
15. "1 e 02"
16. 10e05
17. 15
18. Read the folllowing code
# define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the value after executing this code?
(a) 200 (b) 1 (c) -1 (d) 50
19. A memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed: s="Entrance" l=strlen(s); what is the value of l ?
(a)20 (b)8 (c)9 (d)21
20. Given the piece of code
int a[50]; int *pa; pa=a;
To access the 6th element of the array which of the following is incorrect?
(a) *(a+5) (b) a[5] (c) pa[5] (d) *(*pa + 5}
|
|
|
|
neha
Marketing Executive
Joined:
Mon Aug 24, 2009 10:57 pm
Beans: 767
In Bank: 10965
College: IET
Degree: B.E
Position: Teacher
|
|
Sat Sep 19, 2009 3:16 pm
|
Post subject: Re: TCS (Tata Consultancy Services) Placement Paper
21. Consider the following structure: struct num nam{ int no; char name[25]; }
struct num nam n1[]={{12,"Fred"},{15,"Martin"},{8,"Peter"},{11,Nicholas"}}; ..... ..... printf("%d%d",n1[2],no,(*(n1 + 2),no) + 1);
What does the above statement print?
(a) 8,9 (b) 9,9 (c) 8,8 (d) 8,unpredictable value
22. Identify the in correct expression
(a) a=b=3=4; (b) a=b=c=d=0; (c)float a=int b=3.5; (d)int a; float b; a=b=3.5;
23. Regarding the scope of the varibles;identify the incorrect statement:
(a)automatic variables are automatically initialised to 0 (b)static variables are are automatically initialised to 0 (c)the address of a register variable is not accessiable (d)static variables cannot be initialised with any expression
24. cond 1?cond 2?cond 3?:exp 1:exp 2:exp 3:exp 4; is equivalent to which of the following?
(a)if cond 1 exp 1; else if cond 2 exp 2; else if cond 3 exp 3; else exp 4;
(b) if cond 1 if cond 2 if cond 3 exp 1; else exp 2; else exp 3; else exp 4;
(c) if cond 1 && cond 2 && cond 3 exp 1 |exp 2|exp 3|exp 4;
(d) if cond 3 exp 1; else if cond 2 exp 2; else if cond 3 exp 3; else exp 4;
25. The operator for exponencation is
(a) ** (b) ^ (c) % (d) not available
26. Which of the following is invalid
(a) a+=b (b) a*=b (c) a>>=b (d) a**=b
27. What is y value of the code if input x=10
y=5; if (x==10) else if(x==9) else y=8;
(a)9 (b)8 (c)6 (d)7
28. What does the following code do?
fn(int n,int p,int r){ static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r;}}
(a)computes simple interest for one year (b)computes amount on compound interest for 1 to 4 years (c)computes simple interest for four year (d)computes compound interst for 1 year
|
|
|
|
neha
Marketing Executive
Joined:
Mon Aug 24, 2009 10:57 pm
Beans: 767
In Bank: 10965
College: IET
Degree: B.E
Position: Teacher
|
|
Sat Sep 19, 2009 3:16 pm
|
Post subject: Re: TCS (Tata Consultancy Services) Placement Paper
29. a=0; while(a<5) printf("%d\\n",a++); How many times does the loop occurs?
(a)infinite (b)5 (c)4 (d)6
30. How many times does the loop iterated ?
for (i=0;i=10;i+=2) printf("Hi\\n");
(a)10 (b) 2 (c) 5 (d) None of these
31. What is incorrect among the following A recursive function
(a) calls itself (b) is equivalent to a loop (c) has a termination condition (d) does not have a return value at all
32. Which of the following go out of the loop if expn 2 becoming false
(a) while(expn 1)\{...if(expn 2)continue;} (b) while(!expn 1)\{if(expn 2)continue;...} (c) do{..if(expn 1)continue;..}while(expn 2); (d) while(!expn 2)\{if(expn 1)continue;..\}
33. Consider the following program
main() {unsigned int i=10; while(i>=0){ printf("%u",i) i--;} }
How many times the loop will get executed
(a)10 (b)9 (c)11 (d)infinite
34.Pick out the add one out
(a) malloc() (b) calloc() (c) free() (d) realloc()
35.Consider the following program
main(){ int a[5]={1,3,6,7,0}; int *b; b=&a[2]; } The value of b[-1] is
(a) 1 (b) 3 (c) -6 (d) none
36. # define prod(a,b)=a*b main(){ int x=2; int y=3; printf("%d",prod(x+2,y-10)); }
the output of the program is
(a) 8 (b) 6 (c) 7 (d) None
|
|
|
|
neha
Marketing Executive
Joined:
Mon Aug 24, 2009 10:57 pm
Beans: 767
In Bank: 10965
College: IET
Degree: B.E
Position: Teacher
|
|
Sat Sep 19, 2009 3:17 pm
|
Post subject: Re: TCS (Tata Consultancy Services) Placement Paper
37.Consider the following program segment
int n,sum=1; switch(n){ case 2:sum=sum+2; case 3:sum*=2; break; default:sum=0;}
If n=2, what is the value of sum
(a) 0 (b) 6 (c) 3 (d) None of these
38. Identify the incorrect one
1.if(c=1) 2.if(c!=3) 3.if(a<b)then 4.if(c==1)
(a) 1 only (b) 1&3 (c) 3 only (d) All of the above
39. The format specified for hexa decimal is
(a) %d (b) %o (c) %x (d) %u
40. Find the output of the following program
main(){ int x=5, *p; p=&x printf("%d",++*p); }
(a) 5 (b) 6 (c) 0 (d) none of these
41.Consider the following C code
main(){ int i=3,x; while(i>0){ x=func(i); i--; }
int func(int n){ static sum=0; sum=sum+n; return(sum);}
The final value of x is
(a) 6 (b) 8 (c) 1 (d) 3
43. Int *a[5] refers to
(a) array of pointers (b) pointer to an array (c) pointerto a pointer (d) none of these
44.Which of the following statements is incorrect
(a) typedef struct new{ int n1; char n2; } DATA;
(b) typedef struct { int n3; char *n4;}ICE;
(c) typedef union{ int n5; float n6;} UDT;
(d) #typedef union { int n7; float n8;} TUDAT;
|
|
|
|
Clera
As a Family
Joined:
Wed Sep 16, 2009 11:51 am
Beans: 28
In Bank: 510
College: AMU
Degree: Btech
Department: doctor
State: Andhra
|
|
Mon Sep 21, 2009 6:31 pm
|
Post subject: Re: TCS (Tata Consultancy Services) Placement Paper
Quantitative Ability
1) Bhanu spends 30% of his income on petrol on scooter. ¼ of the remaining on house rent and the balance on food. If he spends Rs.300 on petrol then what is the expenditure on house rent?
a) Rs.525 b) Rs.1000 c) Rs.675 d) Rs.175
2) If the numerator of a fraction is increased by 25% and denominator decreased by 20%, the new value is 5/4. What is the original value?
a) 3/5 b) 4/5 c) 7/8 d) 3/7
3) The length of a rectangle is increased by 60%. By what % would the width have to be decreased to maintain the same area? a) 30% b) 60% c) 75% d) 37.5%
4) The value of ¾ + 5 / 36 + 7 / 144 + …….+17 / 5184 + 19 / 8100 is a) 0.99 b) 0.98 c) 0.95 d) None of these
5) A sporting goods store ordered an equal number of white and yellow balls. The tennis ball company delivered 45 extra white balls, making the ratio of white balls to yellow balls 1/5 : 1/6. How many white tennis balls did the store originally order for? a) 450 b) 270 c) 225 d) None of these
6) A student's grade in a course is determined by 6 quizzes and one examination. If the examination counts thrice as much as each of the quizzes, what fraction of final grade is determined by the examination?
a) 1/6 b) 1/5 c) 1/3 d) 1/4
7) A sum of money is divided among A, B and C such that for each rupee A gets, B gets 65paise and C gets 35paise. If C's share is Rs.560, the sum is …
a) 2400 b) 2800 c) 3200 d) 3800
8) Joe's father will be twice his age 6 years from now. His mother was twice his age 2 years before. If Joe will be 24 two years from now, what is the difference between his father's and mother's age?
a) 4
b) 6
c) 8
d) 10
9) A traveler walks a certain distance. Had he gone half a kilometer an hour faster \, he would have walked it in 4/5 of the time, and had he gone half a Kilometer an hour slower, he would have walked 2 ½ hr longer. What is the distance?
a) 10 Km
b) 15 Km
c) 20 Km
d) Data Insufficient
10) Two oranges, 3 bananas and 4 apples cost Rs.15. 3 oranges, 2 bananas and 1 apple cost Rs.10. I bought 3 oranges, 3 bananas and 3 apples. How much did I pay?
a) 10
b) 8
c) 15
d) Cannot be determined
11) A report consists of 20 sheets each of 55 lines and each such line consists of 65 characters. This report is retyped into sheets each of 65 lines such that each line consists of 70 characters. The % reduction in the number of sheets is closest to
a) 20
b) 5
c) 30
d) 35
12) A ship leaves on a long voyage. When it is 18 miles from the shore, a seaplane, whose speed is 10 times that of the ship is sent to deliver mail. How far from the shore does the seaplane catch upo with the ship?
a) 24 miles
b) 25 miles
c) 22miles
d) 20 miles
13) 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
14) 3 men finish painting a wall in 8 days. Four boys do the same job in 7 days. In how many days will 2 men and 2 boys working together paint two such walls of the same size?
a) 6 6/13 days
b) 3 3/13 days
c) 9 2/5 days
d) 12 12/13 days
15) There are 5 distinct pairs of white socks and 5 pairs of black socks in a cupboard. In the dark, how many socks do I have to pull out to ensure that I have at least 1 correct pair of white socks?
a) 3
b) 11
c) 12
d) 16
16) In a circular race track of length 100 m, three persons A, B and C start together. A and B start in the same direction at speeds of 10 m/s and 8 m/s respectively. While C runs in the opposite at 15 m/s. When will all the three meet for the first time on the after the start?
a) After 4 s
b) After 50 s
c) After 100 s
d) After 200 s
17) If the distance traveled (s) in time (t) by a partile is given by the formula s = 1+ 2t+3t2+4t3 , then what is the distance travelled in the 4th second of its motion?
a) 141m
b) 171m
c) 243m
d) 313m
18) There is a circular pizza with negligible thickness that is cut into 'x' pieces by 4 straight line cuts. What is the maximum and minimum value of 'x' respectively?
a) 12,6
b) 11,6
c) 12,5
d) 11,5
19) When ¾ of a unit's digit is added to the ten's digit of a two number, the sum of the digits becomes 10. If ¼ of the ten's digit added to the unit's digit, then the sum of the digits is 1 less than the previous. Find the number.
a) 94
b) 84
c) 48
d) 88
20) LCM of x and y is 36 and HCF of x and y is 4. If x = 4 then which of the following is definitely not true?
a) Y is divisible by 3
b) Y is divisible by 6
c) Y is divisible by 9
d) X+Y is divisible by
21) 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
22) A non stop bus to Amritsar overtakes an auto also moving towards Amritsar at 10 am. The bus reaches Amritsar at 12.30 pm and starts on the return journey after 1 hr. On the way back it meets the auto at 2 pm. At what time the auto will reach Amritsar?
a) 2.30pm
b) 3.00pm
c) 3.15pm
d) 3.30pm
23) The total expense of a boarding house are partly fixed and partly variable with the number of boarders. The charge is Rs.70 per head when there are 25 boarders and Rs.60 when there are 50 boarders. Find the charge per head when there are 100 boarders.
a) 65
b) 55
c) 50
d) 45
24) How many positive integer solutions does the equation 2x+3y = 100 have?
a) 50
b) 33
c) 16
d) 35
25) A person had to multiply two numbers. Instead of multiplying by 35, he multiplied by 53and the product went up by 540. What was the raised product?
a) 780
b) 1040
c) 1590
d) 1720
Key to Mock Test 2
1. d 2. b 3. d 4. a 5. c 6. c 7. c 8. c 9. b 10. c 11. a 12. d 13. d 14. d 15. c 16. c 17. b 18. d 19. c 20. d 21. b 22. b 23. b 24. c 25. c
|
|
|
|
Clera
As a Family
Joined:
Wed Sep 16, 2009 11:51 am
Beans: 28
In Bank: 510
College: AMU
Degree: Btech
Department: doctor
State: Andhra
|
|
Mon Sep 21, 2009 6:31 pm
|
Post subject: Re: TCS (Tata Consultancy Services) Placement Paper
I found more placement questions here.........
1. 232 expressed in base-5 is 1412. (Similar Q in different form & number also appeared.)
2. Pick the odd one out: A) SMTP B) HTTP C) ARP D) SAP E)
3. Pick the odd one out: A) DB2 B) ORACLE C) WAP D) ARP E) (I might have interchanged some choices for Qs 2 & 3. Please check.)
4. The following is not a triangle: A) (60o, 80o, 20o) B) (90o, 60o, 30o) C) (54o, 66o, 60o) D) (69o, 51o, 60o) Ans: A (since sum of the angles in a triangle = 180o.)
5. The following is a planar cube (E, V, F): A) (12, 8, 6) B) (12, 6, 8) C) (6, 6, 8) D) (6, 8, 6) E - no. of edges V - no. of vertices F - no. of faces Ans: A
6. The greatest prime number among the following which can be stored in a 6-bit word computer is: A) 61 B) 63 C) 65 D) 67 E) 69
7. Calc. A-(B C) and represent the resulting 8-bit word in decimal form. A 0 0 1 1 0 0 1 1 B 0 1 0 1 0 1 0 1 C 0 0 0 0 1 1 1 1 A-(B C) (I might have interchanged the values of A, B & C but still try this.)
8. Fit a suitable curve with the given data. x y 1000 3 … … … … … … A) y = log x B) y = log 10x C) y = -10log x D) y = ex Ans: A
9. How many B's are followed by G's which are not followed by S's in the following series: B B G M P Q B G S K O B G A S B B G D E F B G S T I Ans: 4 (Another Q on the same logic was also asked.)
10. M(373,5) + R(3.4) + T(7.7) - R(5.8) = ___ M - Modulo R - Round-off T - Truncate Ans: 3 + 3 + 7 - 6 = 7 (In the above, first term means the remainder obtained after dividing 373 by 5.)
11. Match the following: A) Female - Girl i) A type of B) Bug - Reptile ii) A superset of C) Beagle - Dog iii) A part of D) Piston - Engine iv) Not a part of (Another set like this was also asked.)
12. There is a matrix X of order 7 9 whose elements will be filled column-wise. The address of the first element X(1,1) is 1258. Each element occupies 4 bytes of memory. Then the address of the element X(5,8) is 1473.
13. 5 7 11 ? 25 Ans: 17
14. A, B & C can do a piece of work in 8 days. A alone can do it in 12 days and B alone can do it 16 days. Then C alone can do it in ___.
15. The line equation of the following curve is
A) y = ex B) y = tan x C) y = cos x D) x + y = 0 Ans: D (For some others, tan x and cos x curves were asked.)
16. A & B can do a piece of work in 12 days. A is capable of doing twice the work as B. In how many days A alone can complete the work?
17. If the first/second, third/fourth, fifth/sixth etc. letters of the word PSYCHIATRIST are interchanged, then the letter which is 8th from right is I .
18. If DCPRY is coded as CBOQX then SPEND can be coded as RODMC.
19. The following is not a triangle: A) (2,3,4) B) (3,4,5) C) (5,5,5) D) (1,3,5) Ans: D (Clue: Sum of any two sides should be greater than the third side.)
20. Temperature in Chennai is measured since 12 noon is given by (t2/9) + 4t + 16. Then the difference in temperatures between 4 pm and 9 pm is ___. (I don't remember the question but can only outline it.)
21. Aeroplane - 12oN 26oE - 20oS 30oW - Longitude - 8 hours to reach destination. (I don't remember the question but can only outline it. Ans: 5 hr. 40 min.)
22. Three savings 20%, 40%, 10% - Net saving? (I don't remember this question also but can only outline it.)
23. _____ A) Distance B) Time C) Velocity D)
24. n 100 or 100 n (I don't remember ). If n increases by 1% then ---
25. Data Interpretation from Charts
|
|
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Bookmark & Share
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|

| |