Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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 9612

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][5] d.*(*pa + 5)

6 20963

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 8256

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

8 11600

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 6751

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

5 6200

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 9267

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 8698

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 10921

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

9 14590

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;...}{..if(expn 1)continue;..}while(expn 2); d.while(!expn 2){if(expn 1)continue;..}

4 5900

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

2 10844

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

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 10304

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

7 7750

Post New TCS Interview Questions

TCS Interview Questions

Un-Answered Questions

5. Which of the following can you do with DB2 Express- C? Query databases with SQL Query databases with XML using XQuery and XPath Use SQL in Xquery and Xquery in SQL All of the above


What is your biggest strength and what else do you need to improve in your skills to come to a satisfactory level?


What are intraspecific and interspecific ecological interactions?


What is the difference between class selector and id selector?


How are actions and functions different in QTP?


What is jsp and why do we need it?


What request type from a rest resource allows one to delete a sharepoint object?


Does windows 10 have excel?


What are the advantages of inline styles?


What are the different types of Insurance coverage?


What do you mean by in-memory replication?


What is meant by u-area?


what is granularity in Data ware House?


How to call stored procedure in spring framework?


How do you check if two Strings are equal valued ?