Data Structure Quiz 10

To improve Knowledge in the field of Data Structures and its Concepts

25 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

How many fields are there in a node of a doubly linked list?

  1. 2
  2. 3
  3. 1
  4. 4
Question 2 Multiple Choice (Single Answer)

How many pointers are in the assigned state in a 10 - node doubly linked list?

  1. 20
  2. 10
  3. 18
  4. 8
Question 3 Multiple Choice (Single Answer)

There are 10 elements in an array. If 4th element is deleted, position of how many elements is changed?

  1. 7
  2. 8
  3. 6
  4. 5
Question 4 Multiple Choice (Single Answer)

Given array of elements [50 60 30 40 20 15 25]. In how many comparisons, 4th largest item can be found if Bubble sort is applied?

  1. 18
  2. 24
  3. 22
  4. None of these
Question 5 Multiple Choice (Single Answer)

Given an array A[-1:7, 0:6]. The number of rows and columns in this array are

  1. 9, 7
  2. 7, 6
  3. 8, 6
  4. none of these
Question 6 Multiple Choice (Single Answer)

In a linear queue, Front = 7 and Rear = 25. What is the number of elements in the queue?

  1. 18
  2. 17
  3. 19
  4. None of these
Question 7 Multiple Choice (Single Answer)

What is the similarity between the operations on stack and queues, although they are entirely different?

  1. Both are LIFO lists.
  2. Both are FIFO lists.
  3. Both are linear data structures.
  4. Insertion in both the data structures take place at the same end.
Question 8 Multiple Choice (Single Answer)

The queue data structure is not applicable in

  1. scheduling of jobs in CPU
  2. printing of documents in printer
  3. management of files on disk
  4. typing of letters on keyboard
Question 9 Multiple Choice (Single Answer)

Given an array A[lb:ub]. The number of elements in this array is given by the formula

  1. ub - lb
  2. ub - lb + 1
  3. ub - lb -1
  4. lb - ub + 1
Question 10 Multiple Choice (Single Answer)

How many elements are there in the left half of the partition?

  1. 8
  2. 6
  3. 5
  4. 7
Question 11 Multiple Choice (Single Answer)

Let n be the integer and L(n) be a function defined as
L(n) = 0 if n = 1
L(én/2ù) + 2 if n>1
What is the value of L(19)?

  1. 8
  2. 10
  3. 12
  4. None of these
Question 12 Multiple Choice (Single Answer)

If PRCD(x, y) function gives TRUE operator and x has precedence over y, what is the output of the function PRCD(*, /)?

  1. TRUE
  2. FALSE
  3. Undefined
  4. None of these
Question 13 Multiple Choice (Single Answer)

The function of generating the nth fibonacci number is given below
0 n = 1
Fib(n) = 1 n = 2
Fib(n-1) + Fib(n-2) n>2
What is the value of Fib(10)

  1. 21
  2. 34
  3. 55
  4. None of these
Question 14 Multiple Choice (Single Answer)

What is the value of the postfix expression 854*+63/-?

  1. 26
  2. 28
  3. 30
  4. None of these
Question 15 Multiple Choice (Single Answer)

What is the value of the expression 23­522­*+62/-?

  1. 28
  2. 31
  3. 25
  4. None of these
Question 16 Multiple Choice (Single Answer)

How many fields are there in a node of a circular doubly linked list?

  1. 3
  2. 1
  3. 2
  4. 4
Question 17 Multiple Choice (Single Answer)

If we try to represent a degree - 2 polynomial with linked list, how many fields a node will have?

  1. 2
  2. 3
  3. 4
  4. 5
Question 18 Multiple Choice (Single Answer)

How many pointers are in the assigned state in a 10 - node circular doubly linked list?

  1. 20
  2. 10
  3. 18
  4. 22
Question 19 Multiple Choice (Single Answer)

Given an infix expression with parenthesis. If we try to convert this postfix in the resultant expression

  1. all the parenthesis will remain there
  2. some parenthesis are taken and some discarded
  3. no parenthesis is taken
  4. the positions are parenthesised and changed
Question 20 Multiple Choice (Single Answer)

In the problem of Towers of Hanoi with 4 disks, how many minimum moves are required to transfer all disks from source peg to the destination peg?

  1. 16
  2. 15
  3. 17
  4. None of these
Question 21 Multiple Choice (Single Answer)

If all the elements are in the array, then Quick sort runs in……..time.

  1. O(nlog n)
  2. O(n2)
  3. O(n2log n)
  4. O(n)
Question 22 Multiple Choice (Single Answer)

If we run quick sort on the set '66 24 59 80 29 35 40 45 65 90', then after first partition, the elements in the right part are

  1. 65 66 90
  2. 66 80 90
  3. 80 90
  4. none of these
Question 23 Multiple Choice (Single Answer)

position of which element is fixed?

  1. 66
  2. 65
  3. 80
  4. none of these
Question 24 Multiple Choice (Single Answer)

What is the postfix equivalent of a­b­c­d?

  1. bacd
  2. abcd­­­
  3. cadb
  4. None of the above
Question 25 Multiple Choice (Single Answer)

If PRCD (x, y) function gives TRUE operator, and x has precedence over y. What is the output of the function PRCD(­,­)?

  1. TRUE
  2. FALSE
  3. Undefined
  4. None of these