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...
HOME
YEAR N ORG
- C++ (1)
- CISCO 2000 (1)
- CISCO IN ISI (1)
- CISCO SELECTION PROCEDURE (1)
- CTS-JUNE-2005 (1)
- GD TIPS (1)
- GE-NIT-CALICUT-06 (1)
- HCL 1995 (1)
- HCL INTERIVIEW (1)
- HUGHES - 2003 (1)
- HUGHES DELHI 1997 (1)
- HUGHES-26/12/03 (1)
- I'VIE QNS TECH COMP (1)
- I'VIEW HOW TO DRESS (1)
- I'VIEW QNS AT EBAY (1)
- I'VIEW QNS ON C (1)
- I'VIEW QNS ORACLE (1)
- I'VIEW TIPS (TEAM) (1)
- I'VIEW TIPS 1 (2)
- I'VIEW TIPS 2 (1)
- I'VIEW TIPS 3 (1)
- I'VIEW TIPS 5 (1)
- I'VIEW WAY OF ANSWERING (1)
- IBM - 2006 (1)
- INFOSYS DCE DELHI 2K (1)
- INFOSYS 1997 (1)
- INFOSYS 1998 (1)
- INFOSYS CET 2000 (1)
- INFOSYS I'VIEW 05 (1)
- INFOSYS IISC (1)
- INFOSYS IISC 2K (1)
- INFOSYS IISC B'LORE (1)
- INFOSYS IITB 2000 (1)
- INFOSYS IITD 2000 (1)
- INFOSYS IT BHU 2K (1)
- INFOSYS PAPER (1)
- INFOSYS PAPR 97 (1)
- INFOSYS QNS (1)
- INFOSYS QYESTIONS (1)
- INFOSYS TECH LTD (1)
- INFOSYS VJIT 2000 (1)
- INFOSYS-BANGLORE-2006 (1)
- interview tips (1)
- ORACLE CANDIDATE EXP (1)
- ORACLE CHENNAI 13/07/03 (1)
- Oracle OFF CAMP (1)
- ORACLE-2001 (1)
- ORACLE-GUIDANCE (1)
- ORACLE-NITK-11/07/03 (1)
- ORACLE-OF CAMPUS 22/06/06 (1)
- ORACLE-OFCAMP -21/06/03 (1)
- ORACLE-OFCAMP 21/06/03 (1)
- ORACLE-OFCAMP-JULY 2003 (1)
- ORACLE-RECW-2003 (1)
- PATNI 1999 (1)
- RESUME 2 (1)
- RESUME 3 (1)
- RESUME 4 (1)
- RESUME 5 (1)
- RESUME 6 (1)
- RESUME 7 (1)
- SAS (1)
- SASKEN SEP 2003 (1)
- SATYAM 2K3 (1)
- SATYAM 2003 (1)
- SATYAM PAPER (1)
- SATYAM PAPER - GD (1)
- SATYAM PAPER CAND EXP (1)
- SATYAM PATTERN (1)
- SATYAM SAMPLE TEST (1)
- SATYAM2003 (1)
- SQL (1)
- Tcs (1)
- TCS - 2006 (1)
- TCS -JADAVPUR UNI 99 (1)
- TCS 01/07/06 PAPER I'VIEW (1)
- TCS 1998 (2)
- TCS 2000 (1)
- TCS 2003 (1)
- TCS B'LRE 23/09/06CAND EXP (1)
- TCS CAND EXPERIENCE (1)
- TCS CHENNAI 10/12/06 (1)
- TCS COBOL PAPER (1)
- TCS HYD 07/10/06 (1)
- TCS HYD 07/10/06 CAND EXP (1)
- TCS I'VIEW (1)
- TCS MODEL PAPER (1)
- TCS PAPER (1)
- TCS PAPER 1998 (1)
- TCS PAPER 2000 (1)
- TCS PAPER I'VIEW 24/07/06 (1)
- TCS PAPER1 (1)
- TCS PATTERN CAND EXP (1)
- TCS PONDY 02/06/07 I'VIEW (1)
- TCS RANCHI 24/07/06 (1)
- TCS ROORKEE 31/07/97 (1)
- TCS SAMPLE TEST 1 (1)
- TCS SAMPLE TEST 2 (1)
- TCS TALENT TEST 1 (1)
- TCS-HYD-20/10/06 (1)
- TEX TECH TEST 2003 (2)
- TEXAS PAPER 2000 (1)
- TEXAS 1999 (1)
- TEXAS 28/07/08 (1)
- TEXAS CSE 2001 (1)
- TEXAS IISc (1)
- TEXAS IITB (1)
- TEXAS IITK (1)
- TEXAS INSTR PAPER (1)
- TEXAS JADAVPUR 99 (1)
- TEXAS PAPER (1)
- TEXAS REC 2000 (1)
- wipro (1)
- WIPRO 1995 (1)
- WIPRO 1999 (1)
- WIPRO 2000 (1)
- WIPRO 2K (2)
- WIPRO INTERVIEW (1)
- WIPRO INTERVIEW 95 (1)
- WIPRO JULY 1997 (1)
- WIPRO NITDURGAPUR 03 (1)
- WIPRO PAPER 2000 (1)
- WIPRO PROCESS B'LORE (1)
- WIPRO ROORKEE 2K (1)
- WIPRO SAMPLETEST 2 (1)
- WIPRO SAMPLETEST1 (1)
- WIPRO SMAPLETEST 3 (1)
- WIPRO SURAT 2002 (1)
- WIPRO TECH 2000 (1)
Wednesday, April 18, 2007
Tcs c paper 98
Posted by
pappuagloco
at
9:33 PM
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment