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 11793

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 28863

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 9705

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 14424

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 7777

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

5 7625

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 10639

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 11239

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 14668

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

9 17973

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 7389

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

2 12010

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

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 12797

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

7 9881

Post New TCS Interview Questions


TCS Interview Questions


Un-Answered Questions

Can you tell me how to create the HRLeaveapproval workflow by using SPDesinger?

454


Describe what is Node in link list? And name the types of Linked Lists?

542


Explain Class Constructors in salesforce?

215


How do I change the default font in excel 2013?

288


Explain what is angle and amplitude modulation? What is noise in modulation?

599






Mention how to create an effective sap test case?

29


How does a boat measure speed?

680


What is a scope in AngularJS?

471


Which sorting is stable?

491


When sound waves travel from air to water, what happens to its frequency?

563


How long should a session id be?

538


How do you delete a file in unix?

515


How is a cell named?

303


What is type qualifiers?

674


What does dml stand for?

514