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

Placement Questions & Answers :: TCS Digital

61. Alok and Bhanu play the following min-max game. Given the expression N = 25 + X + Y - Z , where X, Y and Z are variables representing single digits (0 to 9), Alok would like to maximize N while Bhanu would like to minimize it. Towards this end, Alok chooses a single digit number and Bhanu substitutes this for a variable of her choice (X, Y or Z). Alok then chooses the next value and Bhanu, the variable to substitute the value. Finally Alok proposes the value for the remaining variable. Assuming both plays to their optimal strategies, the value of N at the end of the game would be

Answer:

Explanation:

For these type of ques, remember dis thumb rule.. X*Y-Z=18
X+Y-Z=11 X-Y-Z=2
So
N = 25 + X + Y - Z
N= 25+11=36

Workspace

Tags:

TCS NQT TCS Digital 

62. A hare and tortoise a race along a circle of 100 yards diameter. The tortoise goes in one direction and the hare in the other. The hare starts after tortoise has covered 1/5 its distance and that leisurely. The hare and tortoise meet when the hare has covered only 1/4 of the distance. By what factor should the hare increase its speed so as to tie the race?

Answer:

Explanation:

First distance = 1/x Second distance = 1/y Let z = xy-x
Required factor will be = z*(z-y)/x^2 In this question..
x=5, y=4
z=5*4-5=15
z-y = 15-4 = 11
Required factor = 15*11/25 =6.6

Workspace

Tags:

TCS NQT TCS Digital 

63. For the FIFA world cup, Paul the octopus has been predicting the winner of each match with amazing success. It is rumoured that in a match between 2 teams A and B, Paul picks A with the same probability as A's chances of winning. Let's assume such rumours to be true and that in a match between Ghana and Bolivia, Ghana the stronger team has a probability of 2/3 of winning the game. What is the probability that Paul will correctly pick the winner of the Ghana- Bolivia game?

Answer:

Explanation:

Paul picks A with the same probability as A's chances of winning.
Chance of A winning = 2/3
Prediction of octopus is also = 2/3 (given in question)
Chance of B winning = 1/3 Octopus prediction = 1/3
So probability of picking a winner = (prob picking of Ghana * Ghana winning + prob picking of Bolivia * Bolivia winning)
= (2/3)*(2/3) +(1/3)*(1/3) = 5/9.

Workspace

Tags:

TCS Ninja TCS Digital TCS NQT 

64. What is the output of the following code statements? The compiler saves the first integer at the memory location 4062. Integer is one byte long.
integer a pointer b a = 20
b = &a print b

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

65. What is the output of the following code statements? The compiler saves the first integer at the memory location 4165 and the rest at consecutive memory spaces in order of declaration. Integer is one byte long.
integer a, b pointer c, d a = 30
c = &a b = c
a = a + 10 print b

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

66. Consider the statement while (a < 10.0) { a = a a }
Assuming a is positive, for what value of a will this code statement result in an infinite loop?

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

67. In a sequential programming language, code statements are executed in which order?

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

68. A sort which uses the binary tree concept such that any number in the tree is larger than all the numbers in the subtree below it is called

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

69. Reshama is debugging a piece of code which takes several iterations of modifying and executing code, while Mohammad has to deliver a product to the customer, which the customer will run multiple times. Reshama wants her debug cycle to take minimum possible time, while Mohammad wants that his products run time is minimum. What tools should Reshama and Mohammad respectively use on their code?

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

70. Consider the following function:
function run( )
{
integer a = 0 // Statement 1 while (a < 5)
{
integer c = 0 // Statement 2 c = c + 1 // Statement 3
a = a + 1
}
print c // Statement 4
}
At which statement in this program will the compiler detect an error?

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital