31. In the following sorting procedures, which one will be the slowest for any given array?
Answer:
Explanation:Here is no explanation for this answer
Workspace
TCS Ninja
32. In a sequential programming language, code statements are executed in which order?
Answer:
Explanation:Here is no explanation for this answer
Workspace
TCS NQT TCS Ninja TCS Digital
33. 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
TCS NQT TCS Ninja TCS Digital
34. 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
TCS NQT TCS Ninja TCS Digital
35. An integer X is saved as an unsigned 8-bit number, 00001011. What is X?
Answer:
Explanation:Here is no explanation for this answer
Workspace
TCS Ninja
36. Saumya writes a code which has a function which calls itself. Which programming concept is Saumya using?
Answer:
Explanation:Here is no explanation for this answer
Workspace
TCS Ninja
37. 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
TCS NQT TCS Ninja TCS Digital
38. Which of the following data structure may give overflow error, even though the current number of element in it is less than its size ?
Answer:
Explanation:Here is no explanation for this answer
Workspace
TCS NQT TCS Ninja TCS Digital
39. I have a problem to solve which takes as input a number n. The problem has a property that given the solution for (n-1), I can easily solve the problem for n. Which programming technique will I use to solve such a problem?
Answer:
Explanation:Here is no explanation for this answer
Workspace
TCS NQT TCS Ninja TCS Digital
40. Himanshu wants to write a program to print the larger of the two inputted number. He writes the following code:
int number1, number 2 input number1, number 2 if (??) // Statement 1 print number1
else
print number2 end if
Fill in the ?? in statement 1.
Answer:
Explanation:Here is no explanation for this answer
Workspace
TCS Ninja