Placement Papers: TCS Paper 449
Get unlimited access to the best preparation resource for CTET/Paper-2 : get questions, notes, tests, video lectures and more- for all subjects of CTET/Paper-2.
TCS PAPER ON 8th SEPTEMBER 2006
Quantitative Section
- There are 150 weights. Some are 1 kg weights and some are 2 kg weights. The sum of the weights is 260. What is the number of 1kg weights? Ans. 40
- A is driving on a highway when the police fines him for overspeeding and exceeding the limit by 10 km/hr. At the same time B is fined for overspeeding by twice the amount by which A exceeded the limit. If he was driving at 35 km/hr what is the speed limit for the road? Ans. 15 kmph
- A moves 3 kms east from his starting point. He then travels 5 kms north. From that point he moves 8 kms to the east. How far is A from his starting point? Ans. 13 kms
- A car travels 12 kms with a th filled tank. How far will the car travel with filled tank? Ans. 5 kms
- The sum of the digits of a two digit number is 8. When 18 is added to the number, the digits are reversed. Find the number? Ans. 35
- The cost of one pencil, two pens and four erasers is ₹ 22 while the cost of five pencils, four pens and two erasers is ₹ 32. How much will three pencils, three pens and three erasers cost? Ans. 27
- Fathers age is 5 times his son ′ s age. 4 years back the father was 9 times older than son. Find the fathers ′ present age. Ans. 40 years
- What number should be added to or subtracted from each term of the ratio 17: 24 so that it becomes equal to 1: 2. Ans. 10 should be subtracted
- What is the 12th term of the series 2,5, 8, ________ Ans. 35
- If 20 men take 15 days to to complete a job, in how many days can 25 men finish that work? Ans. 12 days
- In a fraction, if 1 is added to both the numerator at the denominator, the fraction becomes . If numerator is subtracted from the denominator, the fraction becomes . Find the fraction. Ans.
- If ₹ 1260 is divided between between A, B and C in the ratio 2: 3: 4, what is C՚s share? Ans. ₹ 560
- A shopkeeper bought a watch for ₹ 400 and sold it for ₹ 500. What is his profit percentage? Ans. 25%
- What percent of 60 is 12? Ans. 20%
- Hansie made the following amounts in seven games of cricket in India: ₹ 10, ₹ 15, ₹ 21, ₹ 12, ₹ 18, ₹ 19
and ₹ 17 (all figures in crores of course) . Find his average earnings.
Ans. ₹ 16 crore
Technical Test
- The C language terminator is
- semicolon
- colon
- period
- exclamation mark
- What is false about the following--A compound statement is
- A set of simple statments
- Demarcated on either side by curly brackets
- Can be used in place of simple statement
- A C function is not a compound statement.
- What is true about the following C Functions
- Need not return any value
- Should always return an integer
- Should always return a float
- Should always return more than one value
- Main must be written as
- The first function in the program
- Second function in the program
- Last function in the program
- Any where in the program
- Which of the following about automatic variables within a function is correct?
- Its type must be declared before using the variable
- Tthey are local
- They are not initialised to zero
- They are global
- Write one statement equivalent to the following two statements x = sqr (a) ; return (x) ; Choose from one of the alternatives
- return (sqr (a) )
- printf ( “sqr (a) ” )
- return (a-a-a)
- printf ( “% d” sqr (a) )
- Which of the following about the C comments is incorrect?
- Ccommentscan go over multiple lines
- Comments can start any where in the line
- A line can contain comments with out any language statements
- Comments can occur within comments
- What is the value of y in the following code? x = 7; y = 0; if (x = 6) y = 7; else y = 1
- 7
- 0
- 1
- 6
- Read the function conv () given below conv (int t) {int u; u = - (t − 32) ; return (u) ;} What is returned
- 15
- 0
- 16.1
- 29
- Which of the following represents true statement either x is in the range of 10 and 50 or y is zero
- x >= 10 && x ⇐ 50 y == 0
- x < 50
- y! = 10 && x >= 50
- None of these
- Which of the following is not an infinite loop?
- while (1) ⧵ {________}
- for {…}
- x = 0; do {/-x unaltered within the loop-/________} while (x == 0)
- -define TRUE 0
- …
- while (TRUE) {________}
- 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
- How does the C compiler interpret the following two statements p = p + x; q = q + y
- p = p + x; q = q + y
- p = p + xq = q + y
- p = p + xq; q = q + y
- p = p + x/q = q + y For questions 14, 15,16, 17 use the following alternatives a. Int
- b. Char
- c. String
- d. Float
- ‘9’
- “1 e 02”
- 10e05
- 15
- Read the folllowing code-define MAX 100 if the initial value of x = 200, what is the value after executing this code?
- 200
- 1
- -1
- 50
- 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?
- 20
- 8
- 9
- 21
- 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 + 5)
- a [5]
- pa [5]
- - (-pa + 5)
- Consider the following structure: Struct number nam {int no; char name [25] } struct number 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?
- 8,9
- 9,9
- 8,8
- 8, unpredictable value
- Identify the in correct expression
- a = b = 3 = 4
- a = b = c = d = 0
- float a = int b = 3.5
- int a; float b; a = b = 3.5
- Regarding the scope of the varibles; identify the incorrect statement:
- automatic variables are automatically initialised to 0
- static variables are are automatically initialised to 0
- the address of a register variable is not accessiable
- static variables cannot be initialised with any expression
- cond 1? cond 2? cond 3? Exp 1: Exp 2: Exp 3: Exp 4; is equivalent to which of the following?
- if cond 1 exp 1; else if cond 2 exp 2; else if cond 3 exp 3; else exp 4
- if cond 1 if cond 2 if cond 3 exp 1; else exp 2; else exp 3; else exp 4
- if cond 1 && cond 2 && cond 3 exp 1 exp 2 exp 3 exp 4
- if cond 3
- exp 1.
- else if cond 2 exp 2.
- else if cond 3 exp 3.
- else exp 4.
- The operator for exponencation is (a) - (b) ^ (c) % (d) not available
- Which of the following is invalid
- a += b
- a-= b
- a? = b
- a-= b
- What is y value of the code if input x = 10 y = 5; if (x == 10) else if (x == 9) else y = 8
- 9
- 8
- 6
- 7
- 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;} }
- computes simple interest for one year
- computes amount on compound interest for 1 to 4 years
- computes simple interest for four year
- computes compound interst for 1 year
- a = 0; while (a < 5) printf ( “% d⧵⧵n” a ++) ; How many times does the loop occurs?
- infinite
- 5
- 4
- 6
- How many times does the loop iterated? for (i = 0; i = 10; i += 2) printf ( “Hi⧵⧵n” )
- 10
- 2
- 5
- None of these
- What is incorrect among the following A recursive function
- calls itself
- is equivalent to a loop
- has a termination condition
- does not have a return value at all
- Which of the following go out of the loop if expn 2 becoming false
- while (expn 1) ⧵ {… If (expn 2) continue;}
- while (! expn 1) ⧵ {if (expn 2) continue; …}
- do {. If (expn 1) continue;} while (expn 2)
- while (! expn 2) ⧵ {if (expn 1) continue; ⧵}
- Consider the following program main () {unsigned int i = 10; while (i >= 0) {printf ( “% u” i) i--;} } How many times the loop will get executed
- 10
- 9
- 11
- infinite
- Pick out the add one out
- malloc ()
- calloc ()
- free ()
- realloc ()
- Consider the following program main () {int a [5] = {1, 3,6, 7,0} ; int-b; b = &a [2] } The value of b [-1] is
- 1
- 3
- -6
- none
- -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
- 8
- 6
- 7
- None
- 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
- 0
- 6
- 3
- None of these
- Identify the incorrect one
- The format specified for hexa decimal is
- % d
- % o
- % x
- % u
- Find the output of the following program main () {int x = 5, p; p = &x printf ( “% d” + ± p) ;}
- 5
- 6
- 0
- none of these
- 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
- 6
- 8
- 1
- 3
- Int-a [5] refers to
- array of pointers
- pointer to an array
- pointerto a pointer
- none of these
- Which of the following statements is incorrect
- typedef struct new {int n1; char n2;} DATA
- typedef struct {int n3; char-n4;} ICE
- typedef union {int n5; float n6;} UDT
- -typedef union {int n7; float n8;} TUDAT
Regards, pratyusha