[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.45K

Tot. Mock Test: 40


Total Qs: 652+

NA
SHSTTON
33
Solv. Corr.
4
Solv. In. Corr.
37
Attempted
0 M:0 S
Avg. Time

531 / 652

Choose the correct option.

Which of the following special symbol allowed in a variable name?


A* (asterisk)

B| (pipepne)

C=-(hyphen)

D_ (underscore)

Answer: Option D

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS

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

532 / 652

Choose the correct option.

What are the types of linkages?


AInternal and External

BExternal, Internal and None

CExternal and None

DInternal

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS

NA
SHSTTON
7
Solv. Corr.
17
Solv. In. Corr.
24
Attempted
0 M:0 S
Avg. Time

533 / 652

Choose the correct option.

Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1?


Arem = 3.14 % 2.1;

Brem = modf(3.14, 2.1);

Crem = fmod(3.14, 2.1);

DRemainder cannot be obtain in floating point division.

Answer: Option C

Explanation:

fmod(x,y) - Calculates x modulo y, the remainder of x/y.
This function is the same as the modulus operator. But fmod() performs floating point divisions.

Submit Your Solution

Tags: TCS

NA
SHSTTON
16
Solv. Corr.
11
Solv. In. Corr.
27
Attempted
0 M:0 S
Avg. Time

534 / 652

Choose the correct option.

Are the expressions arr and &arr same for an array of 10 integers?


AYes

BNo

Answer: Option B

Explanation:

Both mean two different things. arr gives the address of the first int, whereas the &arr gives the address of array of ints.

Submit Your Solution

Tags: TCS

NA
SHSTTON
18
Solv. Corr.
36
Solv. In. Corr.
54
Attempted
0 M:0 S
Avg. Time

535 / 652

Is there any difference int the following declarations?
int fun(int arr[]);
int fun(int arr[2]);

AYes

BNo

Answer: Option B

Explanation:

No, both the statements are same. It is the prototype for the function fun() that accepts one integer array as an parameter and returns an integer value.

Submit Your Solution

Tags: TCS

NA
SHSTTON
9
Solv. Corr.
18
Solv. In. Corr.
27
Attempted
0 M:0 S
Avg. Time

536 / 652

What will be the output of the program ?

#include
int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;m = a[i++];
printf("%d, %d, %d", i, j, m);
return 0;
}


A2, 1, 15

B1, 2, 5

C3, 2, 15

D2, 3, 20

Answer: Option C

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS

NA
SHSTTON
30
Solv. Corr.
22
Solv. In. Corr.
52
Attempted
0 M:0 S
Avg. Time

537 / 652

Choose the correct option.
In C, if you pass an array as an argument to a function, what actually gets passed?

AValue of elements in array

BFirst element of the array

CBase address of the array

DAddress of the last element of array

Answer: Option C

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS

NA
SHSTTON
18
Solv. Corr.
11
Solv. In. Corr.
29
Attempted
0 M:0 S
Avg. Time

538 / 652

Choose the correct option.

What does the following declaration mean?
int (*ptr)[10];


Aptr is array of pointers to 10 integers

Bptr is a pointer to an array of 10 integers

Cptr is an array of 10 integers

Dptr is an pointer to array

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS

NA
SHSTTON
33
Solv. Corr.
80
Solv. In. Corr.
113
Attempted
0 M:0 S
Avg. Time

539 / 652

Choose the correct option.

What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?


AThe element will be set to 0.

BThe compiler would report an error.

CThe program may crash if some important data gets overwritten.

DThe array size would appropriately grow.

Answer: Option C

Explanation:

Here is no explanation for this answer

Submit Your Solution

NA
SHSTTON
20
Solv. Corr.
17
Solv. In. Corr.
37
Attempted
0 M:0 S
Avg. Time

540 / 652

Choose the correct option.

Comment on the below while statement
while (0 == 0) { }


AIt has syntax error as there are no statements within braces {}

BIt will run forever

CIt compares 0 with 0 and since they are equal it will exit the loop immediately

DIt has syntax error as the same number is being compared with itself

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: TCS


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