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

41. Code A has to execute 4*n2 + 64 program statements, while Code B has to execute 32 n program statements for a problem of size n. The time for executing a single program statement is same for all statements. Rajesh was given a problem with a certain size k and he delivered Code A. What could be the possible value of k?

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS Ninja 

42. Which of the following is true about comments?

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

43. A language has 28 different letters in total. Each word in the language is composed of maximum 7 letters. You want to create a data-type to store a word of this language. You decide to store the word as an array of letters. How many bits will you assign to the data-type to be able to store all kinds of words of the language.

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

44. function g(int n)
{
if (n > 0) return 1;
else return -1;
}
function f(int a, int b)
{
if (a > b) return g(a-b); if (a < b) return g(-b+a); return 0;
}
If f(a,b) is called, what is returned?

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

45. Shrishti writes the code for a function that computes the factorial of the inputted number n.
function factorial(n)
{
if(n equals 1)
return 1 else
-- MISSING STATEMENT --
end
}
Fill in the missing statement

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS Ninja 

46. As part of the maintenance work, you are entrusted with the work of rearranging the library books in a shelf in proper order, at the end of each day. The ideal choice will be

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS Ninja 

47. The average search time of hashing with linear probing will be less if the load factor

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

48. A character in new programming language is stored in 2 bytes. A string is represented as an array of characters. A word is stored as a string. Each byte in the memory has an address. The word "Mahatma Gandhi" is stored in the memory with starting address 456. The letter 'd' will be at which memory address?

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

49. Srishti writes a program to find an element in the array A[5] with the following elements in order: 8 30 40 45 70. She runs the program to find a number X. X is found in the first iteration of binary search. What is the value of X?

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS NQT TCS Ninja TCS Digital 

50. Stack is useful for implementing

Answer:

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS Ninja