Data Structure MCQ – More Data Structure MCQs Part-1

1. A ___________refers to a single unit of values.

A. data value.

B. attribute value.

C. data item.

D. elementary.

Answer: item.

2. Data items that are divided into subitems are called ___________.

A. single items.

B. group items.

C. elementary items.

D. entity items.

Answer: items.

3. Which of these best describes an array?

A. A data structure that shows a hierarchical behavior

B. Container of objects of similar types

C. Container of objects of mixed types

D. All of the mentioned

Answer: B.Container of objects of similar types

4. In _______________all the records contain the same data items with the same amount of space.

A. variable-length records.

B. fixed-length records.

C. subscripted variable.

D. superscripted variable.

Answer:B.fixed-length records.

5. The logical or mathematical model of a particular organization of data is called a _______________.

A. data structure.

B. algorithms.

C. structure.

D. logic structure.

Answer: structure.

6. Arrays are best data structures for _____________________________.

A. relatively permanent collections of data.

B. the size of the structure and the data in the structure are constantly changing.

C. both of above situation.

D. None of the above.

Answer: A.relatively permanent collections of data.

7. How do the nested calls of the function get managed?

A. Through Queues.

B. Through Stacks.

C. Through Trees.

D. Through Graphs.

Answer: B.Through Stacks.

8. __________is combining the records in two different sorted files in to a single sorted file.

A. Sorting.

B. Searching.

C. Listing.

D. Merging.

Answer: D.Merging.

9. In linear search algorithm the Worst case occurs when ____________.

A. The item is somewhere in the middle of the array.

B. The item is not in the array at all.

C. The item is the last element in the array.

D. The item is the last element in the array or is not there at all.

Answer: D.The item is the last element in the array or is not there at all.

10. The complexity of Binary search algorithm is ____________.

A. O(n).

B. O(log n ).

C. O(n2).

D. O(n log n).

Answer:B.O(log n ).

11. The complexity of Bubble sort algorithm is _________.

A. O(n).

B. O(log n).

C. O(n2).

D. O(n log n).


12. Inorder traversal of binary search tree will produce _______________.

A. unsorted list.

B. sorted list.

C. reverse of input.

D. none of these.

Answer: B.sorted list.

13. Sub algorithms fall into two basic categories: function sub algorithms and ____________ sub algorithms.

A. procedure.

B. argument.

C. processor.

D. methods.

Answer: A.procedure.

14. Two main measures for the efficiency of an algorithm are____________.

A. Processor and memory.

B. Complexity and capacity.

C. Time and space.

D. Data and space.

Answer: C.Time and space.

15. New data are to be inserted into a data structure, but there is no available space; this situation is usuallycalled__________.

A. Underflow.

B. Overflow.

C. Houseful.

D. Saturated.

Answer: B.Overflow.

16. Which of the following data structure is linear data structure?

A. Tree.

B. Graph.

C. Array.

D. Linked list.

Answer: C.Array.

17. Which of the following is an example of dynamic programming approach?

A. Fibonacci Series

B. Tower of Hanoi

C. Dijkstra Shortest Path

D. All of the above

Answer: D.All of the above

18. The memory address of the first element of an array is called_________.

A. floor address.

B. foundation address.

C. first address.

D. base address.

Answer: D.base address.

19. Which data structure allows deleting data elements from front and inserting at rear?

A. Stacks.

B. Queues.

C. Dequeues.

D. Binary search tree.

Answer: B.Queues.

20. Binary search algorithm cannot be applied to________ concept.

A. unsorted linked list.

B. sorted binary trees.

C. sorted linear array.

D. pointer array.

Answer: A.unsorted linked list.

21. Graph traversal is different from a tree traversal, because

A. trees are not connected.

B. graphs may have loops.

C. trees have root.

D. None is true as tree is a subset of graph.

Answer: C.trees have root.

22. Linked lists are suitable for which of the following problems?

A. Insertion sort

B. Binary search

C. Radix sort

D. dequeue.

Answer: B.Binary search

23. Identify the data structure which allows deletions at both ends of the list but insertion at only oneend___________.

A. Input-restricted dequeue.

B. Output-restricted dequeue.

C. Priority queues.

D. Data structure.

Answer:A.Input-restricted dequeue.

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

A. Strings.

B. Lists.

C. Stacks.

D. Hierarchical.

Answer: D.Hierarchical.

25. To represent hierarchical relationship between elements, which data structure is suitable?

A. Dequeue.

B. Priority.

C. Tree.

D. Binary tree.

Answer: C.Tree.

26. When does the ArrayIndexOutOfBoundsException occur?

A. Compile-time

B. Run-time

C. Not an error

D. None of the mentioned


27. The depth of a complete binary tree is given by__________.

A. Dn = n log2n.

B. Dn = n log2n+1.

C. Dn = log2n.

D. Dn = log2n+1.

Answer:D.Dn = log2n+1.

28. When converting binary tree into extended binary tree, all the original nodes in binary treeare___________.

A. internal nodes on extended tree.

B. external nodes on extended tree.

C. vanished on extended tree.

D. post order traversal.

Answer: A.internal nodes on extended tree.

29. Which of the following conditions checks available free space in avail list?

A. Avail=Top

B. Null=Avail

C. Avail=Null

D. Avail=Max stack

Answer: C.Avail=Null

30. Which of the following sorting algorithm is of divide-and-conquer type?

A. Bubble sort.

B. Insertion sort.

C. Quick sort.

D. Algorithm.

Answer: C.Quick sort.

31. STACK is also called as ______________.





Answer: B.LIFO

32. Collection of related data items is called _______.

A. files

B. fields

C. attributes.

D. records.

Answer: D.records.

33. Breadth First search is used in____________.

A. binary tree.

B. stacks.

C. graphs.

D. both a and c.

Answer: C.graphs.

34. A variable whose size is determined at compile time and cannot be changed at run time is_________.

A. static variable.

B. dynamic variable.

C. not a variable.

D. data variable.

Answer:A.static variable.

35. Process of inserting an element in stack is called ____________.

A. Create

B. Push

C. Evaluation

D. Pop

Answer: B.Push

36. Length of linear array can be found by using the formula_________

A. UB-LB+1



D. LB-UB+1

Answer: A.UB-LB+1

37. The average number of key comparisons done in a successful sequential search in a list of length nis___________.

A. log n

B. n-1/2.

C. n/2.

D. n+1/2.


38. A technique for direct search is _______________.

A. Binary Search

B. Linear Search

C. Tree Search

D. Hashing

Answer: D.Hashing

39. Base address is the address of __________.

A. first element

B. middle element

C. last element

D. pivot element

Answer: A.first element

40. A _____________ list is a list where the last node contains null pointer.

A. circular header.

B. grounded header.

C. rounded header.

D. linked header.

Answer: B.grounded header.

41. ___________are used to facilitate the processing of information in an array.

A. Pointers.

B. Memory location.

C. Records.

D. Variables.

Answer: A.Pointers.

42. The comparison tree is also called as________.

A. decision tree.

B. binary tree.

C. sequential tree.

D. b+ tree.

Answer: A.decision tree.

43. A linked list whose last node points back to the list node instead of containing the null pointer________.

A. circular list.

B. linked list.

C. circular doubly linked list.

D. doubly linked list.

Answer: A.circular list.

44. __________________ is a header list where the last node contains the null pointer.

A. Circular Header linked list

B. Grounded Header Linked list

C. Linked list

D. Linear Array

Answer: B.Grounded Header Linked list

45. Which of the following case does not exist in complexity theory

A. Best case

B. Worst case

C. Average case

D. Null case

Answer: D.Null case

46. The _________ for a linked list is a pointer variable that locates the beginning of the list.

A. anchor.

B. base.

C. footer.

D. header.

Answer: D.header.

47. The time factor when determining the efficiency of algorithm is measured by____________.

A. counting microseconds.

B. counting the number of key operations.

C. counting the number of statements.

D. counting the kilobytes of algorithm.

Answer: B.counting the number of key operations.

48. The space factor when determining the efficiency of algorithm is measured by___________.

A. counting the maximum memory needed by the algorithm.

B. counting the minimum memory needed by the algorithm.

C. counting the average memory needed by the algorithm.

D. counting the maximum disk space needed by the algorithm.

Answer: A.counting the maximum memory needed by the algorithm.

49. The Worst case occur in linear search algorithm when_____________.

A. item is somewhere in the middle of the array.

B. item is not in the array at all.

C. item is the last element in the array.

D. item is the last element in the array or is not there at all.

Answer: D.item is the last element in the array or is not there at all.

50. The complexity of linear search algorithm is____________.

A. O(log n).

B. O(n).

C. O(n2).

D. O(n log n).Answer: B.O(n).