Common Jobs

TCS NQT Mock

1 / 80

1. In the context of OOP, what is "dynamic dispatch"?

2 / 80

2. When we implement stack by using linked list then:

3 / 80

3. Consider a situation where swap operation is very costly. Which of the followingsorting algorithms should be preferred so that the number of swap operations are minimizedin general?

4 / 80

4. In a psychology test of 6 students- P, Q, R, A, B, and C, the teacher found following information regarding the intelligence level of students.P is more intelligent than A.R is less intelligent than C.P is more intelligent than Y.Q is as much intelligent as B.If B and C are not the most intelligent student, then who will be the most intelligent student?

5 / 80

5. Five friends A, B, C, D and E are sitting in a line facing North. Who is sitting exactly in the middle.1. C is sitting between A and B. E is at the fourth Place to the left of B.2. E is sitting to the immediate left of D. C is to the immediate left of B.

6 / 80

6. A series is given with one term missing. Select the correct alternative from the given ones that willcomplete the series.TONY, WTGP, ZYZG, ?, FILO

7 / 80

7. Which of the below SDLC models does not incorporate any changes?

8 / 80

8. Which of the following algorithm design technique is used in Quick sort?

9 / 80

9. In a competitive exam, 5 marks are awarded for every correct answer and for every wrong answer 2 marks are duducted. Sathwik scored 32 marks in this examination. If the 4 marks had been awarded for each correct answer and 1 marks are deducted for each incorrect answer, sathwik should have scored 34 marks. If sathwik attempted all the question, how many question were there in test?

10 / 80

10. If one dimentional array A[MAXSIZE] is used to implement two stacks provided twostacks grow from opposite ends of the array. Variables top1 and top2 (top1 < top 2) pointto the location of the topmost element in each of the stacks, then which of the followingsstetements must be true?I. If the space is to be used efficiently, the condition for stack full is top1= top2 - 1II. The condition for stack full is top1 + top2 = MAXSIZE

11 / 80

11. Which algorithm technique is most suitable to implement to solve travelling salesman problem?

12 / 80

12. A fruit seller purchased 32 kg grapes for Rs. 960. He dried them to make raisins and would be able to sell raisins for Rs. 65 per kg. He can get 800 gm raisins from 1 kg grapes. Find profit %.

13 / 80

13. The kind of software testing you can do when you have both the source code and the executable code in hand, is called as?

14 / 80

14. The statement printf (“%d, 25 ? 5 ? 0 : 5 : 25); will print

15 / 80

15. In which stage are the master test plan artifacts required to be completed and reviewed in SDLC model?

16 / 80

16. Two dimensional arrays are also called

17 / 80

17. What is the output of the following pseudocode?FUNCTION fun()INTEGER x,y,z;x=2; y=4; z=5z+= x^y&zprint z ;END FUNCTION

18 / 80

18. Which SDLC model ensures about risk analysis?

19 / 80

19. Pipe X, Y and Z can fill a cistern 8 hrs, 12 hrs and 24 hrs respectively. All three began to fill the cistern together but X and Y left 4 hrs and 3 hrs respectively before filling the cistern. What is the total time taken by all of them to fill the cistern?

20 / 80

20. When we implement stack by using linked list then:

21 / 80

21. #include<stdio.h>int main () {while (){print(“Hello World”);}return 0;}

22 / 80

22. Which of the following data structures is used in DFS?

23 / 80

23. What is the sum (in RS) which divided among X Y Z in the proportion 3 ∶ 5 ∶ 7 provides rupees 8000 more to Z than what it would have done to him when the proportion is 11 ∶ 15 ∶ 19?

24 / 80

24. Dalip can row 42 km downstream in 2 hours and the same distance upstream in 2 hours and 48 minutes. How much time will he take to row 31.5 km downstream and 22.5 km upstream?

25 / 80

25. What will be returned? Try{return 1;}catch(){return 2;}finally{return 3;}

26 / 80

26. How many Rs. Would Shalini need to spend to buy 11 pencils and 14 pens.1. Shalini spent an amount of Rs. 201 to buy 15 pencils and 12 pens.2. Shalini spent an amount of Rs. 121 to buy 7 pencils and 9 pens.

27 / 80

27. What is the main difference between an interface and an abstract class in Java?

28 / 80

28. Standing on a platform, Amit told Sunita that Aligarh was more than ten kilometres but less than fourteen kilometres from there. Sunita knew that it was more than twelve but less than fifteen kilometres from there. If both of them were correct, which of the following could be the distance of Aligarh from the platform?

29 / 80

29. In the following question, select the related letter/letters from the given alternatives.OPCM : NXKL :: ? : QPJM.

30 / 80

30. The average of 41 numbers is 62. The average of the first 21 numbers is 56 and that of the last 21 numbers is 70. If the 21st number is removed, then what will be the average of the remaining numbers?

31 / 80

31. A man has to travel 50 km in two hours. He could 20 km in one hour, and then had to stop for 10minutes for refueling. By what factor should he increase his speed with reference to that of the first hourso as to be able to complete the journey as per schedule?

32 / 80

32. Select the best suitable answer for the below functions.sizeof()strlen

33 / 80

33. *From the given statements, which one is CORRECT regarding infix notation?

34 / 80

34. What will be the output of the following pseudocode?integer x, y, zx = 2y = 1z = 5doprint z--while( (x&y) || (z+1) )End Loop

35 / 80

35. #define VAR_A 4#define VAR_B 4#define ALL_VAR VAR_A + VAR_BConsider the above macros and evaluate the result of the following.Res=ALL_VAR * ALL_VAR

36 / 80

36. Which of the following is a consequence of violating the Liskov Substitution Principle?

37 / 80

37. Which of the following C++ features can lead to the diamond problem in inheritance?

38 / 80

38. ‘A + B’ means ‘A is the husband of B’.‘A % B’ means ‘A is the father of B’.‘A $ B’ means ‘A is the mother of B’.If ‘Y + Z $ H % C $ D + S’, then which of the following statements is INCORRECT?

39 / 80

39. Five teachers P, Q, R, S and T teach a group of students in a sequence between 9:00 am to 2:00 pm. Each teacher teaches for one hour. Q takes the first class. S teaches just after the T. R teaches before P and T. Who takes the second class from 10:00 am to 11:00 am?

40 / 80

40. In C#, what keyword is used to indicate that a class method can be overridden in any derived class?

41 / 80

41. When a number is divided by 12, 16, 18 and 21 it will leave a remainder of 7 in each case find the third smallest number of this type.

42 / 80

42. Three bells ring simultaneously at 11 a.m. They ring at regular intervals of 20 min., 30 min., 40 min. respectively. The time when all the three bells ring together next is

43 / 80

43. In a class, there are five students A, B, C, D, E who sit on a bench.i) B and D are close friends and they always sit together but not at the end sides of the benchii) E and C sit as far as possibleiii) A is a friend of C and sits to the immediate right of C, and also to the immediate left of BThe two end sides of the bench are occupied by

44 / 80

44. Six girls F, G, H, J, K and L are sitting in a row facing north (not necessarily in the same order). L and K are sitting at extreme ends. Only G is between F and K. J is to the immediate left of H. G is to the immediate right of F. What is the position of F from the left end?

45 / 80

45. Which one NOT a unary operator?

46 / 80

46. What will be the output of the following code?#include <iostream>using namespace std;#define pi 3.14159int main (){float r = 3;float circular_area;circular_area = pi * r * r;cout<<circular_area;return 0;}

47 / 80

47. What is the best time complexity of bubble sort?

48 / 80

48. In a class of 25 students, 12 have taken mathematics, 8 have taken mathematics and computer science. The number of students who have taken computer science but NOT mathematics is:

49 / 80

49. Which of the following options best suits for ‘Memory Leak Occurred’

50 / 80

50. In Python, what is the purpose of the super() function in the context of inheritance?

super()

51 / 80

51. The __________________ data structure is used to check whether an arithmetic expressionhas balanced parenthesis or not

52 / 80

52. Which of the following data structures are indexed structures?

53 / 80

53. Elan, Jeff and Bill together started the business where Elan invested $ 2500 for 8 months, Jeff invested $2000 for 12 months and Bill invested $ 6000 for 4 months. If the profit earned from the business is $1360, then find the share of Jeff.

54 / 80

54. The result of evaluating postfix expression 539*74-/+62*- is

55 / 80

55. Read the given statements and conclusions carefully. Assuming that the information given in the statements is true, even if it appears to be at variance with commonly known facts, decide which of the given conclusions logically follow(s) from the statements.Statements:Some insects are animals.Some animals are frogs.All frogs are cats.Conclusions:I. Some cats are frogs.II. Some frogs are animals.III. Some animals are insects.

56 / 80

56. The collection numbers below is in ascending order (3, 7, 9, N-1, 15, 18, 19, 20) if the median of data 12.5, what is the value of n?

57 / 80

57. If 24 N 16 A 4 = 12 and 14 A 18 N 12 = 20, then 48 N 16 A 15 = ?

58 / 80

58. How can you prevent memory leak in ‘C’ which you would have allocated using dynamic memory allocation?

59 / 80

59. What will be the output of the following code? System.out.println(10 + 20 + "30");

60 / 80

60. Based on what conditions, will the statement C execute?if(condition 1){

16

if (condition 2){//Statement A}elseif (condition 3){// Statement B}else{// Statement C}elseif (condition 4){// Statement D}else{// Statement E}}

61 / 80

61. Convert the following Infix to Postfix expression:W+x*y+(z*a)

62 / 80

62. In a Singly Circular Linked List, how many address fields are there?

63 / 80

63. Which one is not a type of topology?

64 / 80

64. Which of the following is not the required condition for binary search algorithm?

65 / 80

65. A = B means B is the father of A; A * B means A is the sister of B; A ? B means B is the mother of A; A $ B means A is the brother of B; A @ B means B is the son of A; and A × B means A is the daughter of B. Then which of the following is not correct?

66 / 80

66. You are given a question and two statements. Identify which of the statements is/are sufficient to answer the question.Question:When is Yuvi's wedding anniversary?Statements:1: On 7th day of a month.2. The month has 29 days only in a leap year.

67 / 80

67. What is the output of the following pseudocode?Integer nString sSet s =”readwrite”n = stringofLength(s)Print (n ^ 1)

68 / 80

68. If (x + 10)% of 240 is 60% more than x% of 180, then 15% of (x + 20) is what percent less than 25% of x?

69 / 80

69. Integer m=10, n= 35, p=5, d=6

Comment about the output of the given two statements

Print m*n + p/d

Print p/d + m*n

70 / 80

70. What is the average case time complexity of Radix Sort, if n is the number of elements in the array, k is the maximum number of digits in any element of the array?

71 / 80

71. Which among the following options is a compiler optimisation technique that splits any problematic first (or last) few iterations from the loop and performs.

72 / 80

72. A work can be completed by A, B and C in 12 days,15 days and 24 days respectively. A started the work and worked for 2 days then B joined A and together they worked for 5 days. C completed the remaining work alone. Find the time taken by C to complete remaining work.

73 / 80

73. If six digits number 25a64b is divisible by 11. Find the value of (a – b).

74 / 80

74. A variable P is called pointer if

75 / 80

75. The primary mission of an analyst or systems designer is to:

76 / 80

76. What is the output of the below code?#include <stdio.h>int main(){int i, j;for(i=1, j=1; i<=j; i++, j--){printf(“%d”,(i));}return 0;}

77 / 80

77. In the context of OOP, what is meant by "composition"?

78 / 80

78. In each of the 5 pairs of the letter clusters the letter in the second term is arranged / transformed form of the letters in the first term in a particular pattern. Which two pairs has the transformation in same way.A. MASON : AMNOSB. PARTY : APRYTC. FAULT : AFTLUD. LODGE : DOLEGE. CARGO : ACOGS

79 / 80

79. #include <stdio.h>int main()

17

{while(!0 || !1){if(~1){printf(“A”);break;}else{printf(“B”);continue;}}return 0;}

80 / 80

80. Given

public class MyClass

{

public static void main(String args[])

String s1="hello";

String s2=new String("hello");

String s3="hello";

System.out.println(s1==s2); System.out.println(s1==s3); System.out.println(s1.equals(s2));

}

What will be the output ?

Your score is

The average score is 28%

Restart quiz