Home » Data Structure MCQ Answers

Data Structure MCQ Answers

Data Structure MCQ Answers. Get all of the validated answers for the data structure mcq. Ideal for quick and fast review or getting ready for the actual test. if you have short time then you are on right place.

Data Structure MCQ Answers

This is the data structure mcq with 100% correct answers:

Q1. Which of the following is the simplest data structure that supports range searching?

  1. AA-trees
  2. Heaps
  3. binary search trees

Q2. What is the advantage of a hash table as a data structure?

  1. easy to implement
  2. exhibit good locality of reference
  3. very efficient for less number of entries

Q3. Which type of data structure is a ternary heap?

  1. Hash
  2. Array
  3. Priority Stack

Q4. What is a dequeue?

  1. A queue implemented with both singly and doubly linked lists
  2. A queue with insert/delete defined for front side of the queue
  3. A queue implemented with a doubly linked list

Q5. A data structure in which elements can be inserted or deleted at/from both ends but not in the middle is?

  1. Priority queue
  2. Circular queue
  3. Queue

Q6. Which data structure is needed to convert infix notation to postfix notation?

  1. Tree
  2. Branch
  3. Queue

Q7. What is the value of the postfix expression 6 3 2 4 + – *?

  1. 74
  2. 22
  3. 40

Q8. What data structure would you mostly likely see in non recursive implementation of a recursive algorithm?

  1. Linked List
  2. Tree
  3. Queue

Q9. Which of the following statement(s. about stack data structure is/are NOT correct?

  1. Top of the Stack always contain the new node
  2. Null link is present in the last node at the bottom of the stack
  3. Linked List are used for implementing Stacks

Q10. The data structure required for Breadth First Traversal on a graph is?

  1. Array
  2. Stack
  3. Tree

Q11. The prefix form of A-B/ (C * D ^ E. is?

  1. -A/BC*^DE
  2. -ABCD*^DE
  3. -/*^ACBDE

Q12. Which of the following points is/are not true about Linked List data structure when it is compared with an array?

  1. Random access is not allowed in a typical implementation of Linked Lists
  2. Arrays have better cache locality that can make them better in terms of performance
  3. It is easy to insert and delete elements in Linked List

Q13. Which data structure is based on the Last In First Out (LIFO. principle?

  1. Tree
  2. Linked List
  3. Queue

Q14. Which of the following application makes use of a circular linked list?

  1. Recursive function calls
  2. Undo operation in a text editor
  3. Implement Hash Tables

Q15. What is a bit array?

  1. Data structure for representing arrays of records
  2. Array in which elements are not present in continuous locations
  3. An array in which most of the elements have the same value

Q16. Which of the following tree data structures is not a balanced binary tree?

  1. Splay tree
  2. AVL tree
  3. Red-black tree

Q17. Which of the following is not the type of queue?

  1. Priority queue
  2. Circular queue
  3. Ordinary queue

Q18. Which of the following data structures can be used for parentheses matching?

  1. n-ary tree
  2. queue
  3. priority queue

Q19. Which algorithm is used in the top tree data structure?

  1. Backtracking
  2. Branch
  3. Greedy

Q20. What is the need for a circular queue?

  1. easier computations
  2. implement LIFO principle in queues
  3. to delete elements based on priority

Q21. Which of the following is the most widely used external memory data structure?

  1. Red-black tree
  2. AVL tree
  3. Both AVL tree and Red-black tree

Q22. Which of the following is also known as Rope data structure?

  1. Linked List
  2. Array
  3. String

Q23. What will be the output of the following program?

main()  
{  
   char str[]="san foundry";  
   int len = strlen(str);  
   int i;  
 
   for(i=0;i<len;i++)  
        push(str[i]);  // pushes an element into stack
 
   for(i=0;i<len;i++)  
      pop();  //pops an element from the stack
}
  1. foundry nas
  2. sanfoundry
  3. san foundry

Q24. Which of the following data structure can provide efficient searching of the elements?

  1. binary search tree
  2. unordered lists
  3. treap

Q25. What is an AVL tree?

  1. a tree which is unbalanced and is a height balanced tree
  2. a tree with atmost 3 children
  3. a tree with three children

Q26. What is the time complexity for searching a key or integer in Van Emde Boas data structure?

  1. O (M!.
  2. O (log M!.
  3. O (M2.

Q27. The optimal data structure used to solve Tower of Hanoi is _________

  1. Tree
  2. Heap
  3. Priority queue

Q28. What is the use of the bin data structure?

  1. to have efficient traversal
  2. to have efficient deletion
  3. to have efficient insertion

Q29. Which is the most appropriate data structure for reversing a word?

  1. queue
  2. graph
  3. tree

Q30. What is the functionality of the following piece of code?

public void display() 
{
	if(size == 0)
		System.out.println("underflow");
	else
	{
		Node current = first;
		while(current != null)
		{
			System.out.println(current.getEle());
			current = current.getNext();
		}
	}
}
  1. reverse the list
  2. reverse the list excluding top-of-the-stack-element
  3. display the list excluding top-of-the-stack-element

Q31. What is a data structure?

  1. A programming language
  2. A collection of algorithms
  3. A type of computer hardware

Q32. What are the disadvantages of arrays?

  1. Index value of an array can be negative
  2. Elements are sequentially accessed
  3. Data structure like queue or stack cannot be implemented

Q33. Which data structure is used for implementing recursion?

  1. Queue
  2. List
  3. Array

Q34. The data structure required to check whether an expression contains a balanced parenthesis is?

  1. Queue
  2. Tree
  3. Array

Q35. Which of the following is not the application of stack?

  1. Compiler Syntax Analyzer
  2. Tracking of local variables at run time
  3. A parentheses balancing program

Q36. What is the output of the following Java code?

public class array
{
	public static void main(String args[])
	{
		int []arr = {1,2,3,4,5};
		System.out.println(arr[2]);
		System.out.println(arr[4]);
	}
}
  1. 4 and 2
  2. 2 and 4
  3. 5 and 3

Q37. In simple chaining, what data structure is appropriate?

  1. Circular linked list
  2. Singly linked list
  3. Binary trees

Also Read: Computer Network MCQ Answers

Note: If you have the new question on this test, please comment Question and Multiple-Choice list in form below this article. We will update answers for you in the shortest time. Thank you! We truly value your contribution to the website.

Leave a Reply

Your email address will not be published. Required fields are marked *