Company Name Starts with ...
#  A  B  C  D  E   F  G  H  I  J   K  L  M  N  O   P  Q  R  S  T   U  V  W  X  Y  Z

TCS Interview Questions
Questions Answers Views Company eMail

a memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed: s="Etrance" l=strlen(s); what is the value of l ? a.20 b.8 c.9 d.21

4 11684

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)

6 28567

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

4 9597

identify the in correct expression a.a=b=3=4; b.a=b=c=d=0; float a=int b=3.5; d.int a; float b; a=b=3.5;

8 14288

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

1 7734

the operator for exponencation is a.** b.^ c.% d.not available

5 7533

what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7

4 10566

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

7 11107

a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6

7 14549

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n");

9 17781

which of the following go out of the loopo 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;..}

4 7255

pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc()

2 11959

# 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

7 18530

consider the following program sigment 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

7 12644

the format specified for hexa decimal is a.%d b.%o c.%x d.%u

7 9761

Post New TCS Interview Questions


TCS Interview Questions


Un-Answered Questions

Can you extend a final defined class?

8516


how agile testing is performed and what are the related documents.

1386


What is orientation in Android?

501


Explain the functioning of a three-way catalytic converter.

706


Unit Testing can be done by using Nunit?

707






What is the difference between switches and hubs?

494


What does || mean in code?

532


What is the importance of powerpoint?

98


Explain process management system calls in linux?

536


For what purpose would you use the RETAIN statement?

1030


what are the types of ledger you can make in Tally ERP 9?

596


What is supply management in srm ?

553


If a transistor is said to be in saturation it's EB junction & CB junctions are forward biased. But why the current flow occurs in such a condition?

1629


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

618


What shall I go for Package Diagram?

2413