TCS Placement Questions & Answers :: TCS
501 / 652
struct adr {
char *name;
char *city;
int zip;
};
struct adr *adradr;
Aadr->name X
Badradr->name
Cadr.zip X
Dadradr.zip
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
502 / 652
#include <stdio.h>
void main()
{
printf("%d ",printf("FACE"));
}
AFACE4
BError
CGarbage Value
DFACE
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
503 / 652
#include <stdio.h>
main()
{
100;
printf("%d",100);
}
AError
B100
CGarbage value
D100100
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
504 / 652
#include <stdio.h>
void main()
{
printf("\nks");
printf("\bmi a");
printf("\rha n");
}
Aksmiha
Bmis
Cha na
Dhamiks
Answer: Option C
Explanation:Here is no explanation for this answer
Submit Your Solution
505 / 652
#include <stdio.h>
void main()
{
printf("%%%%");
}
A%%%%
B%%
CError
DGarbage Value
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
506 / 652
#include <stdio.h>
void main()
{
float a=1.1;
double b=1.1;
if(a==b)
printf("equal");
else
printf("not equal");
}
A? equal
Bnot equal
CError
Dequal not equal
Answer: Option B
Explanation:datatype is different cant be compared; hence result will be 0
Submit Your Solution
507 / 652
#include <stdio.h>
void main()
{
int sum;
char ch1='a';
char ch2='b';sum=ch1+ch2;
printf("%d",sum);
}
AError
B195
C201
D"ab"
Answer: Option B
Explanation:ascii sum;
sum = 97+98 = 195
Submit Your Solution
508 / 652
#include <stdio.h>
void main()
{
int a=b=c=d=10;
printf("%d,%d,%d,%d",a,b,c,d);
}
AError
B10,10,10,10
CGV,GV,GV,10
DGV,GV,GV,GV
Answer: Option A
Explanation:error: 'b' , 'c', 'd undeclared
Submit Your Solution
509 / 652
#include <stdio.h>
void main()
{
printf("%d",sizeof('a'));
}
A2 or 4
B1 or 3
CGarbage value
DASCII value of a
Answer: Option B
Explanation:same as ? sizeof(97)
Submit Your Solution
510 / 652
#include <stdio.h>
void main()
{
int a=2;
switch(a)
{
case 1: printf("one");
case 2: printf("Two");
case 3: printf("Three");
default:printf("Invalid option");
}
}
Aonetwothree
BInvalid option
Cone two
DTwoThreeInvalid option
ENone of these
Answer: Option D
Explanation:Executable code ; No break statement
Submit Your Solution
Here is the list of questions asked in TCS Aptitude Test Question with Answers page 51. 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