Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.


Please wait...

Placement Questions & Answers :: TCS

Company: TCS

Total Qs: 648+

Website: http://www.tcs.com

Total View: 149.46K


Not Attempted

511. Predict the output of following code:

#include
void main()
{
int a=2;
switch(a)
{
case 1: printf("one");
case 2: printf("Two");
case 3: printf("Three");
default:printf("Invalid option");
}
}

Answer: Option D

Explanation:

Executable code ; No break statement

Submit Your Solution

Tags: TCS


Not Attempted

512. Predict the output of following code:

main()
{
int a=2;
if(a-- , --a, a)
printf("Tom");
else
printf("Jerry");
}

Answer: Option B

Explanation:

if(2, 0, 0) last value 0 ?False

Submit Your Solution

Tags: TCS

Not Attempted

513. Predict the output of following "C" code:

#include
main()
{
int a=100,b=300;
if(a>50)
a=200;
b=400;
printf("%d",b);
}

Answer: Option A

Explanation:

No braces, so only one immediate statement is part of if

Submit Your Solution

Tags: TCS

Not Attempted

514. Predict the output of following "C" code:

void main()
{
if(printf("O", printf("Two")))
printf("Face");
else
printf("Focus");
}

Answer: Option D

Explanation:

prints content of printf statement and takes length of the string for if case execution in this case its 4, So true

Submit Your Solution

Tags: TCS

Not Attempted

515. Predict the output of following "C" code:

void main()
{
if( printf(""))
printf("Face");
else
printf("Focus");
}

Answer: Option D

Explanation:

prints content of printf statement and takes length of the string for if case case its 1, So true

Submit Your Solution

Tags: TCS

Not Attempted

516. Predict the output of following "C" code:

void main()
{
if( printf("Hai"))
printf("Face");
else
printf("Focus");
}

Answer: Option B

Explanation:

prints content of printf statement and takes length of the string for if case execution in this case its 4, So true

Submit Your Solution

Tags: TCS

Not Attempted

517. Predict the output of following "C" code:

void main()
{
if(5,4,3,2,1,0,8,9)
printf("True");
else
printf("False");
}

Answer: Option A

Explanation:

Last value of if will be considered

Submit Your Solution

Tags: TCS

Not Attempted

518. Predict the output of following "C" code:

void main()
{
if(5,4,3,2,1,? 0 ? )
printf("True");
else
printf("False");
}

Answer: Option B

Explanation:

Last value of if will be considered

Submit Your Solution

Tags: TCS

Not Attempted

519. Predict the output of following "C" code:

void main()
{
if(1)
printf("hai");
else
printf("hello");
}

Answer: Option A

Explanation:

If condition will be always

Submit Your Solution

Tags: TCS

Not Attempted

520. Predict the output of following "C" code:

void main()
{
int a,x=2,3,4,5;
a=1,2,3,4,5;
printf("%d%d",x,a);
}

Answer: Option A

Explanation:

Error because list is not within ( )

Submit Your Solution

Tags: TCS

Here is the list of questions asked in TCS Aptitude Test Question with Answers TCS Mock Test page 52. Practice TCS Written Test Papers with Solutions and take Q4Interview TCS Online Test Questions to crack TCS written round test. Overall the level of the TCS Online Assessment Test is moderate. Only those candidates who clear the written exam will qualify for the next round, so practic all the questions here and take all the free tests before going for final selection process of TCS