[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

TCS Placement Questions & Answers :: TCS

390.42K

Tot. Mock Test: 40


Total Qs: 652+

NA
SHSTTON
18
Solv. Corr.
51
Solv. In. Corr.
69
Attempted
0 M:0 S
Avg. Time

521 / 652

What will be output of the following "C" code?
#include <stdio.h>
void main()
{
int i=10;
printf("%d,%d",++i,++i);
}

A11,12

B12,11

C10,11

D11,10

E12,12

Answer: Option E

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS

NA
SHSTTON
87
Solv. Corr.
44
Solv. In. Corr.
131
Attempted
0 M:0 S
Avg. Time

522 / 652

Predict the output of following "C" code.
#include<stdio.h>
void main()
{
int i=10,j=2,k=0,m;
m=++i&&++j&&++k;
printf("%d,%d,%d,%d",i,j,k,m);
}

A11,3,1,1

B11,2,0,1

C11,3,1,0

D10,2,0,1

Answer: Option A

Explanation:

m = 11 && 3 && 1 = 1

Submit Your Solution

NA
SHSTTON
42
Solv. Corr.
29
Solv. In. Corr.
71
Attempted
0 M:27 S
Avg. Time

523 / 652

What will be output of the following "C" code?
#include <stdio.h>
void main()
{
int a=10,x=20;a=a++ + 10;
x=x++ + ++a;
printf("%d,%d",a,x);
}

A22,43

B12,21

C10,20

D42,42

E21,41

Answer: Option E

Explanation:

a = 10+10 first a is increment to 11 but overwritten by 20
x = 20 + 21 a is incremented first from 20 to 21

Submit Your Solution

Tags: TCS

NA
SHSTTON
45
Solv. Corr.
54
Solv. In. Corr.
99
Attempted
0 M:8 S
Avg. Time

524 / 652

Predict the output of following "C" code.
#include <stdio.h>
void main()
{
int a=10,x;
x= a-- + ++a;
printf("%d",x);
}

A19

B20

C22

D23

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS

NA
SHSTTON
80
Solv. Corr.
77
Solv. In. Corr.
157
Attempted
2 M:2 S
Avg. Time

525 / 652

Predict the output of following "C" code:
#include<stdio.h>
main()
{
int x,a=10;
x=9*5+ 7/3 -6+a;
printf("%d",x);
}

A51

B51.5

C31

DNone of these

Answer: Option A

Explanation:

45+2-6+10 = 51
7/3 =2 int division

Submit Your Solution

Tags: TCS

NA
SHSTTON
59
Solv. Corr.
98
Solv. In. Corr.
157
Attempted
0 M:17 S
Avg. Time

526 / 652

Choose the correct option.

Which among the following operator has the right to left associativity?


AArithmetic

Blogical

CRelational

DIncrement/Decrement

Answer: Option D

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS

NA
SHSTTON
35
Solv. Corr.
17
Solv. In. Corr.
52
Attempted
0 M:0 S
Avg. Time

527 / 652

Predict the output of following "C" code:
main()
{
int var=20;
printf("%d,",var);
{
int var=30;
printf("%d",var);
}
}

AError

B20,30

C20,20

DGarbage value

Answer: Option B

Explanation:

scope of the local variable is within function or block

Submit Your Solution

Tags: TCS

NA
SHSTTON
205
Solv. Corr.
93
Solv. In. Corr.
298
Attempted
0 M:0 S
Avg. Time

528 / 652

What will be output of the following "C" code?
#include <stdio.h>
main()
{
int i=-1;
-i;
printf("%d,%d",i,-i);
}

A-1, 1

B-1, -1

C1, 1

D0, 1

Answer: Option A

Explanation:

No change in value of i

Submit Your Solution

Tags: TCS

NA
SHSTTON
115
Solv. Corr.
179
Solv. In. Corr.
294
Attempted
0 M:7 S
Avg. Time

529 / 652

What could be the output for following "C" code?
#include <stdio.h>
main()
{
int a= - - 2;
printf("%d",a);
}

A2

B-2

C1

DError

Answer: Option A

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS

NA
SHSTTON
49
Solv. Corr.
100
Solv. In. Corr.
149
Attempted
0 M:0 S
Avg. Time

530 / 652

Choose the correct option.
Is there any difference between following declarations?

A : extern int fun();
B : int fun();

ABoth are identical

BNo difference, except extern int fun(); is probably in another file

Cint fun(); is overrided with extern int fun();

DNone of these

Answer: Option C

Explanation:

Here is no explanation for this answer

Submit Your Solution


Here is the list of questions asked in TCS Aptitude Test Question with Answers page 53. 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