HOME

YEAR N ORG

Showing posts with label TCS 1998. Show all posts
Showing posts with label TCS 1998. Show all posts

Wednesday, April 18, 2007

Tcs c paper 98

TCS C PAPER-1998
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(a25. 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

______-------------------------------------------------------------------

ALL THE BEST...

Tcs 1998

PATR 1_A : VERBAL COMPREHENSION
-------------------------------
1.) Merry = c) Gay
2.) To Heap = a) to pile
3.) Cargo = d) Froight
4.) Misery = e) Distress
5.) Volume = b) Quantity
6.) To Hamper = b) to obstruct
7.) To Merit = c)
8.) BR!... = a) Border
9.) Tranquil = d) Serene
10.) To Renounce = b) to reject
11.) To Baffle = e) to frustrate
12.) Meager = c) scant
13.) Obstinate = c) Stubbern
14.) To Instigate = d)
15.) To Emancipate = a) to liberate
16.) To Hover = a) to linger
17.) Belief = d) Conviction
18.) To Stifle = e) to smother
19.) Discretion = a) Prudence
20.) To Alienate = b)to estrange
21.) To solicit = e)
22.) Potential = a) Talent
23.) To Veer = e) to diverge
24.) To Subside = d) to wane
25.) tTo Confiscate = d) to appropriate
26.) Caprise = c)Whim
27.) Adhesive = e) Tenacious
28.) Latitude = a) Scope
29.) Inert = b) Passive
30.) To Covet = a) to crave
31.) To Efface = b)
32.) To Concur = a) to acquis...
33.) Furtive = c) Stealthy
34.) Incentive = d) Provocation
35.) Tolerant =
36.) Lethargy = e)Stupor
37.) To Admonish = b) to usurp
38.) Momentary = c) Transient
39.) Pretentious = b)
40.) To Dispel = a) to disspate.



PART 1_B : GENERAL REASONING
----------------------------
.) If 2 articles cost 8 cents, how much would five articles cost
d) 20 cents.
2.) A man was arrested for exceeding the spped limit of 10 miles an hour.A second man was charged with exceedind the same limit by twice as much.The second man was driving with 35 miles per hour. What was the speed limit.
b) 15 miles per hour
3.) A book keeper multiplied a number by 3 when it should have been divided by 3.The answer she got was 3. What should the answer have been.
a) 1/3
4.) A man on motorcylcle rides 110 miles in 330 minutes .What is his averagen speed in miles per hour.
a)20
5.) A stationary engine has enough fuel to run 12 hours when its tank is 4/5 full. How long will it run when it is 1/3 full.
e) 5 hours.
6.) The center of a storm shifts 45 miles in 2 hrs. At the same rate how long would it take to move 60 miles.
c) 2 2/3 hrs.
7.) A 3 galon mix. contains 1 part S and 2 parts R. In order to change it to a mix containing 25% S.How much R should be added.
d) i gallon
8.) A bus left the station at 8.00 AM on an outgoing trip that covers 27 miles.After a 30 Min. stopover it returned. On the outgoing trip it averaged 50% faster. What time did it return to the station.
b) 11.00 am
9.) A tree grows only 3/5 as fast as the one beside it. In four years the combined growth of the 2 trees is 8 feet.How much does the shorter tree grow in 2 years.
a) less than 2 feet.
10.) For a round tap, a car used 4 1/2 gallons of gasoline. If it used 1/4 more. gasoline going than coming back how much gasoline was used coming back.
d) 2 gallons.
11.) A ocean liner L miles from port steams forward port at H miles per hour. another leaves the same port and steams towards the ocean liner at 1 mile per hour. How many miles away from the port will thay meet.
c) Between I J. Closer to J.
12.) The lowest temp. during outgoing the night was 1/3 more than 1/2 high as the highest temp. during the day. The two temp. added together totalled 100 deg.What was the lowest tem.
b) 40 deg.
14.) Two workers load a truck in 24 min. One of the men alone can load it in 40 min. How long will it take the other man to do the job alone.
c) 60 minutes.
15.) A bulding D feet tall casts a snadow G feet long. How tall is a neighbouring bulding casts a shadow C feet long
b) B feet
*********************************************************************

all the best

Recent Comments