Data Structures

This test consists of multiple choice questions related to data structure concept for computer science students and gate aspirants.

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the mean of 'MAX' term in the syntax below?
typedef struct stack{ int data[MAX]; int top;}stack;

  1. It defines the maximum value of the elements in the stack.
  2. It defines the maximum size of the stack.
  3. It defines the number of integer values.
  4. It defines the number of elements in the stack.
  5. Both (2) and (4).
Question 2 Multiple Choice (Single Answer)

Serving requests of a single shared resource and transferring data asynchronously is an example of ___ data structure?

  1. Stack
  2. Queue
  3. Array
  4. Tree
  5. None of the above
Question 3 Multiple Choice (Single Answer)

What will be the pre-order traversal of the given in-order traversal of tree SQTPURV?

  1. PQSTRUV
  2. PQSTRVU
  3. TQSPRUV
  4. TSQPRUV
  5. None of the above
Question 4 Multiple Choice (Single Answer)

Which of the following field in the doubly linked list contains the address of the first element of the list?

  1. Previous pointer field
  2. Next pointer field
  3. Information field of the node
  4. Tail
  5. Head
Question 5 Multiple Choice (Single Answer)

Which of the following is not a true statement?

  1. A binary search tree is represented by the linked list using pointers.
  2. In linked list representation of binary tree, the left pointer points to the data field of the next node.
  3. A binary search tree should have data field in the linked list representation.
  4. Doubly linked list can be used to represent the binary search tree.
  5. None of the above
Question 6 Multiple Choice (Single Answer)

Which of the following is/are not a true statement(s)?

  1. A binary search tree may be empty.
  2. In a binary search tree, the left and right subtree of the root are also binary search trees.
  3. A binary search tree can be represented using linked list.
  4. A binary search tree can be represented using a array.
  5. None of the above
Question 7 Multiple Choice (Single Answer)

Which of the following value will be represented by the previous pointer field in the doubly linked list, if there is no preceding element in the list?

  1. Zero
  2. Null
  3. Void
  4. It does not return any value if the preceding element is absent
  5. None of the above
Question 8 Multiple Choice (Single Answer)

Which of the following will be the sentinel value for front variable for the underflow condition of queue?

  1. 0
  2. 1
  3. - 1
  4. Null
  5. None of the above
Question 9 Multiple Choice (Single Answer)

Which of the following field in the doubly linked list should be Null in case of empty linked list?

  1. prev
  2. next
  3. head
  4. tail
  5. both (3) and (4)
Question 10 Multiple Choice (Single Answer)

A priority queue can be implemented by using ____?

  1. Linked list
  2. Heap
  3. Multiple queues
  4. All of the above
  5. Only (2) and (3)
Question 11 Multiple Choice (Single Answer)

Elements can be added and removed from the either end in ____?

  1. Priority queue
  2. Deque
  3. Linear queue
  4. Circular queue
  5. None of the above
Question 12 Multiple Choice (Single Answer)

What is the mean of shape property of a heap data structure?

  1. It means that the node, which is the smallest of all its children, is called min heap.
  2. It means that the node, which is the largest of all its children, is called max heap.
  3. It means that the heap is a completely or nearly complete binary tree.
  4. Both (2) and (3)
  5. None of the above
Question 13 Multiple Choice (Single Answer)

Which of the following has hierarchical representation of data structure?

  1. Stack
  2. Tree
  3. Queue
  4. Graph
  5. Both (2) and (4)
Question 14 Multiple Choice (Single Answer)

Which of the following is a false statement?

  1. A data structure is a logical representation of a particular data.
  2. Stack and queue are linear data structures.
  3. A heap is called a binary tree.
  4. Data structures also have merging operation.
  5. None of the above
Question 15 Multiple Choice (Single Answer)

Which of following stack operation returns a Boolean value?

  1. push()
  2. pop()
  3. size()
  4. isEmpty()
  5. peek()