This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 9 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 9 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. In a 2D array with dimensions m x n, how are elements stored in memory? A) In a row-major order (each row is stored consecutively). B) In a column-major order (each column is stored consecutively). C) In a mixed-order arrangement. D) In a tree structure. Show Answer Correct Answer: A) In a row-major order (each row is stored consecutively). 2. What data structure is used for breadth first traversal of a graph? A) Queue. B) Stack. C) List. D) None of the above. Show Answer Correct Answer: A) Queue. 3. Full form of LIFO is ..... A) Last Inside First Outside. B) Last Innner First Outer. C) Last In First Out. D) Last Impact First Out. Show Answer Correct Answer: C) Last In First Out. 4. ..... operation returns the value of the topmost element of the stack. A) Push. B) Pop. C) Peep. D) Update. Show Answer Correct Answer: C) Peep. 5. If a node having two children is to be deleted from binary search tree, it is replaced by its A) Pre-order predecessor. B) In-order predecessor. C) In-order successor. D) Post-order successor. Show Answer Correct Answer: C) In-order successor. 6. What is a hash table and how does it work? A) A hash table is a graphical representation of data relationships. B) A hash table is a linear data structure that stores elements in a sequential manner. C) A hash table is a type of database used for storing large amounts of data. D) A hash table is a data structure that uses a hash function to map keys to values for efficient data retrieval. Show Answer Correct Answer: D) A hash table is a data structure that uses a hash function to map keys to values for efficient data retrieval. 7. List and explain the common sorting algorithms in Python. A) Shell Sort. B) Heap Sort. C) Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, Timsort. D) Radix Sort. Show Answer Correct Answer: C) Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, Timsort. 8. (A):Queue is an ordered collection of items (B):Queue is an example for non-linear data structure A) Both A and B are true. B) A is false and B is true. C) A is true and B is false. D) Both A and B are false. Show Answer Correct Answer: C) A is true and B is false. 9. What is a dequeue? A) A queue with insert/delete defined for both front and rear ends of the queue. B) A queue implemented with a doubly linked list. C) A queue implemented with both singly and doubly linked lists. D) A queue with insert/delete defined for front side of the queue. Show Answer Correct Answer: A) A queue with insert/delete defined for both front and rear ends of the queue. 10. Process of removing an element from stack is called ..... A) Create. B) Push. C) Pop. D) Peek. Show Answer Correct Answer: C) Pop. 11. What are the main types of data structures in Python? A) Arrays, Strings, Floats, Booleans. B) Files, Modules, Classes, Functions. C) Lists, Tuples, Sets, Dictionaries. D) Graphs, Trees, Queues, Stacks. Show Answer Correct Answer: C) Lists, Tuples, Sets, Dictionaries. 12. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into a NONEMPTY queue? A) Only front pointer. B) Only rear pointer. C) Both front and rear pointer. D) No pointer will be changed. Show Answer Correct Answer: B) Only rear pointer. 13. When analyzing the function call syntax 'fun()', what distinguishes this from a variable reference? A) The presence of parentheses. B) The capitalization of the name. C) The position in the code. D) The length of the name. Show Answer Correct Answer: A) The presence of parentheses. 14. Which data structure in Python is best suited for implementing a stack? A) List. B) Dictionary. C) Set. D) Deque. Show Answer Correct Answer: A) List. 15. Which of the following types of queues is used to handle multiple tasks in a real-time system where tasks are prioritized? A) Simple Queue. B) Circular Queue. C) Priority Queue. D) Double-Ended Queue (Deque). Show Answer Correct Answer: C) Priority Queue. 16. Why would a programmer choose to break down a complex program into multiple functions rather than writing everything in one large block of code? A) To make the program run in parallel. B) To reduce memory usage. C) To make the program file smaller. D) To improve code organization, readability, and maintainability. Show Answer Correct Answer: D) To improve code organization, readability, and maintainability. 17. Which statement is true about Python dictionaries?Criterion 1:Evaluate and select information sources based on their appropriateness to specific tasks A) They store items in a specific order. B) They store key-value pairs. C) They can only store strings as values. D) They cannot be changed once created. Show Answer Correct Answer: B) They store key-value pairs. 18. Which of the following is non-linear data structure? A) Stacks. B) List. C) Strings. D) Trees. Show Answer Correct Answer: D) Trees. 19. What is the main difference between a set and a list? A) A set can contain duplicates and is ordered, while a list cannot. B) The main difference is that a set contains only unique elements and is unordered, while a list can contain duplicates and is ordered. C) A list is always unordered and contains only unique elements. D) A set is a type of list that allows for ordering of elements. Show Answer Correct Answer: B) The main difference is that a set contains only unique elements and is unordered, while a list can contain duplicates and is ordered. 20. In binary tree nodes with no successor are called terminal nodes A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 21. Define linear data structures and give an example in Python. A) Example of a linear data structure in Python:my list = [1, 2, 3, 4, 5]. B) Example of a linear data structure in Python:my set = \{1, 2, 3\}. C) Example of a linear data structure in Python:my tuple = (1, 2, 3). D) Example of a linear data structure in Python:my dict = \{'a':1, 'b':2\}. Show Answer Correct Answer: A) Example of a linear data structure in Python:my list = [1, 2, 3, 4, 5]. 22. A queue is a ..... data structure in which each element that was inserted first is the first one to be taken out. A) FITO. B) FIFO. C) FISO. D) FIVO. Show Answer Correct Answer: B) FIFO. 23. What are the disadvantages of arrays? A) Index value of an array can be negative. B) Elements are sequentially accessed. C) Data structure like queue or stack cannot be implemented. D) There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size. Show Answer Correct Answer: D) There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size. 24. A tree is composed of ..... connected by edges or lines. A) Fruit. B) Leaf Node. C) Root Node. D) Nodes. Show Answer Correct Answer: D) Nodes. 25. What is the maximum number of children that a node can have in a binary tree? A) 3. B) 1. C) 4. D) 2. Show Answer Correct Answer: D) 2. ← PreviousNext →Related QuizzesClass 12 Computer Science Chapter 1 Data Structures Using Python Quiz 1Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 2Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 3Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 4Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 5Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 6Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 7Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 8Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 10Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books