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 11758

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 28715

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 9668

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 14364

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 7764

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

5 7583

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 10623

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 11188

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 14630

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

9 17909

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 7338

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

2 11999

# 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 18635

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 12765

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

7 9835

Post New TCS Interview Questions


TCS Interview Questions


Un-Answered Questions

Is swift faster than go?

619


In which of the glands are graffian follicles found??

1093


Faults found should be originally documented by whom?

964


How to use the new-window command?

585


Can we create Hierarchies in generic datasources?

1930






What is bootstrap 4 navs?

5


Can php run without server?

563


What is the purpose of setup py?

457


how to get the depth of a queue?

495


Tell me what is the difference between active support's “hashwithindifferent” and ruby's “hash” ?

1


What do you understand by dependency injection?

169


what is earthing.how we make it,describe briefly.

1956


What are some ways in which a company can reduce the need of inventories?

1724


Do loops java?

558


What is iam internal audit management?

368