Data Structures MCQs with Answers
Practice important Data Structures MCQs with answers and explanations.
Multiple Choice Questions
Q591: In a table, what is the term used for a collection of rows?
- A: Fields
- B: Records
- C: Columns
- D: Entries
View Answer
B
Q592: Which data structure is used for implementing a table where entries are stored consecutively?
- A: Sorted Sequential Array
- B: Unsorted Sequential Array
- C: Hash Table
- D: Binary Search Tree
View Answer
B
Q593: What is the primary purpose of the key in a table?
- A: To organize data into categories
- B: To uniquely identify each record
- C: To perform mathematical operations
- D: To link multiple tables together
View Answer
B
Q594: What method is used to add a new record to a table in an unsorted sequential array?
- A: Remove
- B: Find
- C: Insert
- D: Sort
View Answer
C
Q595: Which method in Table ADT is used to retrieve a record based on its key?
- A: Insert
- B: Find
- C: Remove
- D: Update
View Answer
B
Q596: In a sorted sequential array, what operation is performed to maintain order when inserting a new record?
- A: Binary Search
- B: Sorting
- C: Shuffling
- D: Linear Search
View Answer
B
Q597: What is the time complexity of the find operation in a sorted sequential array using binary search?
- A: O(1)
- B: O(n)
- C: O(log n)
- D: O(n log n)
View Answer
C
Q598: When deleting a record from a sorted sequential array, what additional step is needed?
- A: Only remove the record
- B: Re-sort the array
- C: Find the record and shift elements
- D: No additional steps needed
View Answer
C
Q599: In the context of Table ADT, what is a "key"?
- A: A unique identifier for data records
- B: A placeholder for data
- C: A method to sort data
- D: A temporary storage location
View Answer
A
Q600: What is a typical use of a table in a compiler?
- A: Storing function names only
- B: Keeping track of variable declarations
- C: Managing memory allocation
- D: Storing all strings in the program
View Answer
B