wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OPJU Assessment Test PRE

Total questions: 63

Worksheet time: 1hrs 7mins

Name
Class
Date
1.

Which of the following data structures can be efficiently implemented using a stack?

a)

Queue

b)

Binary Search Tree

c)

Heap

d)

Graph

2.

What is the output of the following code?

a)

0

b)

1

c)

2

d)

Attribute error

3.

Which of the following highly uses the concept of an array?

a)

Binary Search tree

b)

Caching

c)

Spatial locality

d)

Scheduling of Processes

4.

Convert the equivalent expression to prefix

a)

-+/abc+d*ef

b)

/+-abcd+*ef

c)

-/+abc+*def

d)

/-+abc+d*ef

5.

What is the outcome of the prefix expression?

a)

18

b)

17

c)

25

d)

26

6.

What is the time complexity of the following code snippet in C++?

a)

O(n)

b)

O(n2)

c)

O(logn)

d)

O(nlogn)

7.

What is the post order traversal for the given graph?

a)

4,12,10,18,24,22,15,31,44,35,90,66,70,50,25

b)

4,12,10,15,18,24,22,25,31,44,35,66,90,70,50

c)

4,10,12,15,18,22,24,25,31,35,44,50,66,70,90

d)

4,12,10,18,24,22,15,31,44,35,66,90,70,50,25

8.

Answer the following question

a)

O(n)

b)

O(log n)

c)

O(n/2)

d)

O(1)

9.

Find the time complexity of the given code snippet

a)

O(n)

b)

O(n2)

c)

O(nlogn)

d)

O(logn)

10.

Find the time complexity of the given code snippet

a)

O(n)

b)

O(n2)

c)

O(nlogn)

d)

O(n log2 n)

11.

Find the time complexity of given code snippet

a)

O(n2 logn)

b)

O(n3)

c)

O(n log2 n)

d)

O(nlogn)

12.

Suppose you have a circular linked list. How do you find the middle node of the circular linked list efficiently?

a)

Circular linked lists do not have a middle node.

b)

Traverse the entire circular list to count the number of nodes and then find the middle node.

c)

Use two pointers; one moves at twice the speed of the other. When the faster one reaches the end, the slower one will be at the middle node.

d)

Move two pointers from both the end,the node where two pointers meet is the middle node.

13.

How to sort a binary search tree?

a)

Post Order Traversal

b)

Inorder Traversal

c)

Pre order traversal

d)

level order traversal

14.

Which of the following sequences of nodes represents an AVL tree?

a)

A

b)

B

c)

C

d)

D

15.

Which of the following code snippets correctly performs a left rotation on an AVL tree?

a)

b)

c)

d)

16.

Which one of the following is the postorder traversal of the tree?

a)

b)

c)

d)

17.

Consider the following C program.

a)

0, c

b)

0, a+2

c)

‘0’, ‘a+2’

d)

‘0’, ‘c’

18.

A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below.

a)

b)

c)

d)

19.

the element in the lowest level is

a)

65

b)

67

c)

69

d)

83

20.

Find the output of the code snippet

a)

20

b)

19

c)

14

d)

17

21.

Which data structure is best suited for implementing a telephone directory?

a)

Stack

b)

Queue

c)

Hash Table

d)

Linked List

22.

Answer the following question

a)

Depth-First Search

b)

Breadth-First Search

c)

Dijkstra's Algorithm

d)

Bellman-Ford Algorithm

23.

Answer the following question

a)

Stack

b)

Queue

c)

Heap

d)

Linked List

24.

Answer the following question

a)

Insertion Sort

b)

Selection Sort

c)

Quick Sort

d)

Merge Sort

25.

Answer the following question

a)

Depth-First Search

b)

Breadth-First Search

c)

Dijkstra's Algorithm

d)

Bellman-Ford Algorithm

26.

Identify the error in the following code that attempts to swap two elements in an array:

a)

The variable temp should be declared as int temp = 0;

b)

The swap function should return the swapped values.

c)

The function call swap(x, y); should be replaced with swap(&x, &y);

d)

The values of x and y are not swapped due to pass-by-value.

27.

Find the error in the following code that attempts to implement a binary search algorithm:

a)

The condition in the while loop should be low < high.

b)

The variable mid should be calculated as mid = (low + high) // 2 + 1

c)

The comparison arr[mid] < target should be arr[mid] > target.

d)

The function should return mid + 1 instead of mid when the target is found.

28.

What will be the output of the code?

a)

1

b)

2

c)

3

d)

null

29.

What should be added in place of "Missing line" to return the sum of digits for the given number?

a)

return n % 10;

b)

return n / 10;

c)

return n + sumOfDigits(n / 10);

d)

return sumOfDigits(n % 10);

30.

What should be added in place of "Missing line 1" to push the value onto the stack, and what should be added in place of "Missing line 2" to pop and return the value from the stack?

a)

Missing line 1: stackArray[++top] = value; | Missing line 2: return stackArray[top--];

b)

Missing line 1: stackArray[top++] = value; | Missing line 2: return stackArray[top];

c)

Missing line 1: stackArray[++top] = value; | Missing line 2: return stackArray[top++];

d)

Missing line 1: stackArray[top--] = value; | Missing line 2: return stackArray[top];

31.

In the first 10 overs of a cricket game, the run rate was only 3.2. what should be the run rate in the remaining 40 overs to reach Target of 282 runs ?

a)

6.25

b)

6.5

c)

6.75

d)

7

32.

Two trains running in opposite directions cross a man standing on the platform in 27 seconds and 17 seconds respectively and they cross each other in 23 seconds. The ratio of their speed is :

a)

1:3

b)

3:2

c)

3:4

d)

None of these

33.

Mr. Thomas invested an amount of RS. 13,900 divided in two different schemes A and B at the simple interest rate of 14% p.a and 11% p.a respectively. If the total amount of simple interest earned in 2 years be RS. 3508, what was the amount invested in scheme B ?

a)

RS. 6400

b)

RS. 6500

c)

RS. 7200

d)

RS. 7500

34.

In a certain store, the profit is 320% of the cost. If the cost increased by 25% but the selling price remains constant, approximately what percentage of the selling Prices is the profit?

a)

30%

b)

70%

c)

100%

d)

25%

35.

Two students appeared at an examination. One of them secured 9 marks more than the other and his mark was 56% of the sum of their marks. The marks obtained by them are :

a)

39,30

b)

41,32

c)

42,33

d)

43,34

36.

On 8th December, 2007 Saturday falls. What day of the week was it on 8th December,2006?

a)

Sunday

b)

Thursday

c)

Friday

d)

Tuesday

37.

How many of the following numbers are divisible by 132?

264,396,462,792,968,2178,5184,6336

a)

4

b)

5

c)

6

d)

7

38.

Six bells commence tolling together and till at intervals of 2,4,6,8,10 and 12 seconds respectively. In 30 minutes, how many times do they toll together?

a)

4

b)

10

c)

15

d)

16

39.

There are two examinations rooms A and B. If 10 students are sent from A to B, then the number of students in each is the same. If 20 candidates are sent from B to A, then the number of students in A is double the number of students in B. The number of students in room A is :

a)

20

b)

80

c)

100

d)

200

40.

A boat can travel with a speed of 13 km/hr in still water. If the speed of the stream is 4 km/hr, find the time taken by the boat to go 68 km downstream.

a)

2 hours

b)

3 hours

c)

4 hours

d)

5 hours

41.

A trader owes a merchant RS. 10,028 due 1 year hence. The trader wants to settle the account after 3 months. If the rate of interest 12 % per annum, how much cash should he pay ?

a)

RS. 9025.20

b)

RS. 9200

c)

RS. 9600

d)

RS. 9560

42.

Find the odd man out.

10,25,45,54,60,75,80

a)

10

b)

45

c)

54

d)

75

43.

Excluding stoppages, the speed of a bus is 54kmph and including stoppages, it's 45 kmph. For how many minutes does the bus stop per hour?

a)

9

b)

10

c)

12

d)

20

44.

A,B and C can do a piece of work in 20, 30 and 60 days respectively. In how many days can A do the work if he is assisted by B and C on every third day ?

a)

12 days

b)

15 days

c)

16 days

d)

18 days

45.

There is 60% increase in an amount in 6 years at simple interest. What will be the compound interest of RS. 12,000 after 3 years at the same rate?

a)

RS.2160

b)

RS. 3120

c)

RS. 3972

d)

RS. 6240

46.

A is two years older than B who is twice as old as C. If the total of the ages of A,B and C be 27, then how old is B?

a)

7

b)

8

c)

9

d)

10

47.

How many times are hands of a clock at right angle in a day ?

a)

22

b)

24

c)

44

d)

48

48.

A sum of money is to be distributed among A,B,C,D in the proportion of 5: 2: 4: 3. If C gets RS. 1000 more than D, what is B's share ?

a)

RS. 500

b)

RS. 1500

c)

RS. 2000

d)

None of theses

49.

In what ratio must a grocery mix two varieties of pulses costing RS. 15 and RS. 20 per kg respectively so as to get mixture worth RS. 16. 50 kg ?

a)

3: 7

b)

5:7

c)

7:3

d)

7: 5

50.

A two digit number is such that the product of the digits is 8. When 18 is added to the number, then the digits are reversed. The number is

a)

18

b)

24

c)

42

d)

81

51.

I love the game of basketball, however, I don't play it myself.

a)

NO CHANGE

b)

basketball: however,

c)

basketball however,

d)

basketball; however,

52.

The tribe was left without food for weeks the members had no choice but to resort to cannibalism.

a)

NO CHANGE

b)

weeks, the

c)

weeks; the

d)

weeks--the

53.

The guy, cleaning the room, is the handyman for our whole school.

a)

NO CHANGE

b)

guy cleaning the room is

c)

guy (cleaning the room) is

d)

guy--cleaning the room-- is

54.

When I turn sixteen I'm going to buy a car.

a)

NO CHANGE

b)

sixteen, I'm

c)

sixteen; I'm

d)

sixteen--I'm

55.

Students who work hard will ace the ACT.

a)

NO CHANGE

b)

Students, whom work hard,

c)

Students who work hard,

d)

Students, who work hard,

56.

Ready for the journey of a lifetime the boy hopped on the spaceship.

a)

NO CHANGE

b)

lifetime; the

c)

lifetime, the

d)

lifetime: the

57.

Stephen King's first novel, Carrie, was a surprise success.

a)

NO CHANGE

b)

novel Carrie was

c)

novel. Carrie was

d)

novel Carrie, was

58.

It was early morning when my sisters and I arrived, at the spa for our facials and massages.

a)

NO CHANGE

b)

my sisters' and I arrived

c)

my sisters and I arrived

d)

my sisters' and I arrived,

59.

In the more than two thousand years since the birth of Jesus millions of believers have traveled to the Holy Land on religious pilgrimages.

a)

NO CHANGE

b)

since the birth of Jesus, millions

c)

since, the birth of Jesus, millions

d)

since, the birth of, Jesus millions

60.

I always carry two items, a wallet and a phone.

a)

NO CHANGE

b)

items; a wallet

c)

items: a wallet

d)

items a wallet

61.

Enter Your Name

4 lines
62.

Enter Your Enrolment No

4 lines
63.

Enter Your Email ID

4 lines