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

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

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

  • a) AVL tree
  • b) B-tree
  • c) Red-black tree
  • d) Both AVL tree and Red-black tree

7. 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

8. In simple chaining, what data structure is appropriate

9. In simple chaining, what data structure is appropriate

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

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

12. The data structure used to implement recursive function calls

13. Which of the following is the advantage of the array data structure

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

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

16. Example of non linear data structure

  • Array
  • Tree
  • Queue
  • Stack

17. 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.

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

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

20. 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

21. 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

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

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

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

  • Array
  • Stack
  • Queue
  • Linked list

25. A struct is typically a ____ data structure.

  • simple
  • linked
  • heterogeneous
  • dynamic

26. Which data structure conveniently used to implement dfs

27. The data structure required to check whether an expression

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

  • Root
  • Branch
  • Child
  • Leaf

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

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

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

  • a. rear > front
  • b. rear < front
  • c. rear = front
  • d. Unpredictable

32. A tree sort is also known as__________ sort.

  • quick
  • heap
  • shell
  • selection

33. Which of the following principle does queue use?

  • LIFO
  • FIFO
  • Linear
  • Ordered

34. 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

35. Which of the following is not a data structure

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

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

38. TREE[1]=NULL indicates is _____________

  • Overflow
  • Empty
  • Underflow
  • Full

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

  • Stack
  • Queue
  • Tree
  • Liked list

40. Which data structure is used by map

41. A tree is composed of ____ connected by edges or lines.

  • Fruit 
  • Leaf Node
  • Root Node
  • Nodes

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

  • A. describes limiting behaviour of the function
  • B. characterises a function based on growth of function
  • C. upper bound on growth rate of the function
  • D. all of the mentioned

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

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

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

45. While implementing Stack using list when we want to delete element we must use pop function as__________

  • list.pop(0)
  • list.pop(pos)
  • list.pop()
  • list.pop(1)

46. In a graph if E=(u,v) means _____________

  • u is adjacent to v but v is not adjacent to u
  • e begins at u and ends at v
  • u is processor and v is successor
  • both b and c

47. Stack is also called as

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

48. 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);
}
  • a) Prints all nodes of linked lists
  • b) Prints all nodes of linked list in reverse order
  • c) Prints alternate nodes of Linked List
  • d) Prints alternate nodes in reverse order

49. 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

  • a)1
  • b)2
  • c)3
  • d)4

50. Identify the types of sorting that used partition and exchange sort.

  • Bubble sort
  • Selection sort
  • Quick sort
  • Merge sort

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.