# Data Structure MCQ – More MCQ With Answer Part-1

## 1. A ___________refers to a single unit of values.

A. data value.

B. attribute value.

C. data item.

D. elementary.

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

A. single items.

B. group items.

C. elementary items.

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

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

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

A. Sorting.

B. Searching.

C. Listing.

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.

A. O(n).

B. O(log n ).

C. O(n2).

D. O(n log n).

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.

A. procedure.

B. argument.

C. processor.

D. methods.

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

A. Underflow.

B. Overflow.

C. Houseful.

D. Saturated.

A. Tree.

B. Graph.

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

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

A. Stacks.

B. Queues.

C. Dequeues.

D. Binary search tree.

## 20. Binary search algorithm cannot be applied to________ concept.

B. sorted binary trees.

C. sorted linear array.

D. pointer array.

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

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

A. Insertion sort

B. Binary search

D. dequeue.

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

A. Strings.

B. Lists.

C. Stacks.

D. Hierarchical.

A. Dequeue.

B. Priority.

C. Tree.

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

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

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

A. Bubble sort.

B. Insertion sort.

C. Quick sort.

D. Algorithm.

A. FIFO

B. LIFO

C. FOLI

D. FOFI

A. files

B. fields

C. attributes.

D. records.

A. binary tree.

B. stacks.

C. graphs.

D. both a and c.

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

A. Create

B. Push

C. Evaluation

D. Pop

A. UB-LB+1

B. LB+UB

C. LB-UB

D. LB-UB+1

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

A. first element

B. middle element

C. last element

D. pivot element

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

A. Pointers.

B. Memory location.

C. Records.

D. Variables.

## 42. The comparison tree is also called as________.

A. decision tree.

B. binary tree.

C. sequential tree.

D. b+ tree.

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

A. circular list.

D. Linear Array

A. Best case

B. Worst case

C. Average case

D. Null case

A. anchor.

B. base.

C. footer.

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

A. O(log n).

B. O(n).

C. O(n2).