About Data Structure

Following are some of the multiple choice questions on the Data Structure with answers that will help the students in developing their knowledge.

Data Structure MCQ

1. What is a data structure?

  • A method of arranging data
  • A way of keeping data without an order?
  • A "stack" only
  • There is no formal definition for "Data Structure"

2. Which of the following data structure is linear type?

  • Stack
  • Array
  • Queue
  • All of the above

3. Which data structure is used for implementing recursion

4. Which data structure is needed to convert infix notation to postfix notation

  • Stack
  • Array
  • Queue
  • None of these

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

  • AVL tree
  • B-tree
  • Red-black tree
  • Both AVL tree and Red-black tree

6. A variant of linked list in which last node of the list points to the first node of the list is?

  • Singly linked list
  • Doubly linked list
  • Circular linked list
  • none of the above

7. In simple chaining, what data structure is appropriate

  • Circular linked list
  • Singly linked list
  • Doubly linked list
  • Binary trees

8. Which of the following is not a linear data structure

  • Array
  • Binary Tree
  • Queue
  • Stacks

9. The data structure used to implement recursive function calls _________

  • Array
  • Linked list
  • Binary tree
  • Stack

10. With what data structure can a priority queue be implemented

  • Heap
  • Tree
  • List
  • Array

11. Example of non linear data structure

  • Array
  • Tree
  • Queue
  • Stack

12. Which one of the following is not a linear data structure

  • Array
  • Stack
  • Queue
  • Binary Tree

13. Which of the following applications may use a stack?

  • A parentheses balancing program
  • Tracking of local variables at run time
  • Compiler Syntax Analyzer
  • Data Transfer between two asynchronous process

14. Which data structure can be used to test a palindrome

  • Tree
  • Heap
  • Stack
  • Priority queue

15. Which data structure is used by map

  • Array
  • DS Tutorial
  • Both A & B
  • none of the above

16. A complete binary tree with 5 levels has how many nodes? (Root is Level 1)

  • Op 1: 15
  • Op 2: 25
  • Op 3: 63
  • Op 4: 31

17. Which data structure is needed to convert infix to postfix

  • Branch data structure
  • Tree data structure
  • Stack data structure
  • Queue data structure

18. What is the data structure used to perform recursion?

  • Array
  • Stack
  • Queue
  • Linked list

19. A struct is typically a ____ data structure.

  • simple
  • linked
  • heterogeneous
  • dynamic

20. Which data structure conveniently used to implement dfs

  • Stacks
  • Queues
  • Priority Queues
  • Both A & B

21. The data structure required to check whether an expression

  • Tree
  • Array
  • Queue
  • Stack

22. A terminal node in a binary tree is called __________

  • Root
  • Branch
  • Child
  • Leaf

23. Which one of the following is not the application of the stack data structure

  • String reversal
  • Recursion
  • Backtracking
  • Asynchronous data transfer

24. The data structure available in the banker's algorithm are

25. A tree sort is also known as__________ sort.

  • quick
  • heap
  • shell
  • selection

26. Suppose we are sorting an array of eight integers using quick sort, and we have just finished the first partitioning with the array looking like this:2 5 1 7 9 12 11 10Identify the correct statement?

  • Neither the 7 nor the 9 is the pivot.
  • The pivot could be either the 7 or the 9.
  • The pivot is not the 7, but it could be the 9.
  • The pivot could be the 7, but it is not the 9.

27. Which of the following principle does queue use?

  • FIFO
  • LIFO
  • Linear
  • Ordered

28. Entries in a stack are “ordered”. What is the meaning of this statement?

  • A collection of stacks is sortable
  • Stack entries may be compared with the ‘<‘ operation
  • The entries are stored in a linked list
  • There is a Sequential entry that is one by one

29. Consider the following operation performed on a stack of size 5.Push(1);Pop();Push(2);Push(3);Pop();Push(4);Pop();Pop();Push(5);After the completion of all operation, the number of elements present in stack are

  • 1
  • 2
  • 3
  • 4

30. Which of the following is not a data structure

  • Array
  • linked list
  • graph
  • Directory

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

  • AVL tree
  • Red-black tree
  • Splay tree
  • B-tree

32. Which of the following data structure is not a linear data structure

  • Arrays
  • Linked lists
  • Both A & B
  • None of these

33. TREE[1]=NULL indicates is _____________

  • Overflow
  • Empty
  • Underflow
  • Full

34. Choose the correct statement

  • A data structure is a specialised format for organising and storing data
  • A data structure is a specialised format for organising and storing information
  • A data structure is a format for organising and storing only one data type
  • A data structure is too complicated to truly understand or use

35. Storage for data defined in terms of set of operations to be performed on the data

  • Arrays
  • Variables
  • Abstract Data Types
  • Algorithms

36. What is the value of the postfix expression 6 3 2 4 + – *:

  • 1
  • 14
  • 74
  • -18

37. In Queue we can not insert an element in between the elements that are already inserted but we can delete it.

  • True
  • False

38. Which of the following data structure is non linear type?

  • Stack
  • Queue
  • Tree
  • Liked list

39. Which of the following abstract data types can be used to represent a many to-many relation?

  • Op 1: Tree
  • Op 2: Stack
  • Op 3: Graph
  • Op 4: Queue

40. Stack is also called as

  • Last in first out
  • First in last out
  • Last in last out
  • First in first out

41. A FIFO structure implemented as a ring where the front and rear pointers can wrap around the end of the start of the array.

  • Linear Queue
  • Circular Queue
  • Priority Queue
  • none of the above

42. Which of the following is not a technique to avoid a collision?

  • Make the hash function appear random
  • Use the chaining method
  • Use uniform hashing
  • Increasing hash table size

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

  • It is easy to insert and delete elements in Linked List
  • Random access is not allowed in a typical implementation of Linked Lists
  • The size of array has to be pre-decided, linked lists can change their size any time.
  • All of the above

44. To measure Time complexity of an algorithm Big O notation is used which:

  • describes limiting behaviour of the function
  • characterises a function based on growth of function
  • upper bound on growth rate of the function
  • all of the mentioned

45. Which among the below specified condition is applicable if the Queue is non - empty?

  • rear > front
  • rear < front
  • rear = front
  • Unpredictable

46. What does the following function do for a given Linked List with first node as head?

void fun1(struct node * head) {
  if (head == NULL) return;
  fun1(head->next);
  printf("%d  ", head->data);
}
  • Prints all nodes of linked lists
  • Prints all nodes of linked list in reverse order
  • Prints alternate nodes of Linked List
  • Prints alternate nodes in reverse order

47. Which ospf data structure is identical on all ospf routers that share the same area?

  • forwarding database
  • link-state database*
  • adjacency database
  • routing table

48. In ____________ data structure, the data items are arranged in a linear sequence.

  • linear
  • non linear
  • both a and b
  • all of above

49. Every stack has a variable _________ associated with it.

  • TOP
  • BOT
  • POT
  • none of the above

50. It is a step by step process to solve a given problem. Take the simplest example below.

  • Pseudo code
  • Programming
  • Algorithm
  • none of the above

Enjoyed the Quiz. Share this with friends

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.