This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 26 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 26 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which is function in C? A) A named block of code. B) Group of statements that together perform a task. C) A & B both. D) None of the above. Show Answer Correct Answer: C) A & B both. 2. What method in Python is used to merge two dictionaries? A) Concat(). B) Merge(). C) Combine(). D) Update(). Show Answer Correct Answer: D) Update(). 3. Elements are added in queue at A) Rear / Back. B) Front. C) Both. D) None. Show Answer Correct Answer: A) Rear / Back. 4. It is a mathematical object which arises in many physical problems, consists of m rows and n columns A) Matrix. B) Array. C) Excel. D) Table. Show Answer Correct Answer: A) Matrix. 5. Given an undirected graph G with V vertices and E edges, the sum of the degrees of all vertices will be? A) E. B) V + E. C) 2E. D) 2V. Show Answer Correct Answer: C) 2E. 6. This is a binary tree in which every level of the tree is completely filled except the last level A) Strictly binary tree. B) Binary search tree. C) Complete binary tree. D) None of the above. Show Answer Correct Answer: C) Complete binary tree. 7. ..... is a prerequisite for the binary search. A) The data must be unsorted. B) The data must be in a linked list. C) The data must be in ascending order only. D) The data must be sorted. Show Answer Correct Answer: D) The data must be sorted. 8. What is the main characteristic of a queue? A) It follows the Last In First Out (LIFO) principle. B) It follows the First In First Out (FIFO) principle. C) It allows random access to elements. D) It allows elements to be accessed only by index. Show Answer Correct Answer: B) It follows the First In First Out (FIFO) principle. 9. What is the purpose of a hash function in data structures? A) A hash function is used to encrypt data for security purposes. B) A hash function maps data of arbitrary size to fixed-size values, facilitating efficient data retrieval in hash tables. C) A hash function is used to sort data in ascending order. D) A hash function is a method for compressing data to save storage space. Show Answer Correct Answer: B) A hash function maps data of arbitrary size to fixed-size values, facilitating efficient data retrieval in hash tables. 10. Which of the following points is/are not true about Linked List data structure when it is compared with an array? A) Arrays have better cache locality that can make them better in terms of performance. B) It is easy to insert and delete elements in Linked List. C) Random access is not allowed in a typical implementation of Linked Lists. D) Access of elements in linked list takes less time than compared to arrays. Show Answer Correct Answer: D) Access of elements in linked list takes less time than compared to arrays. 11. What is the primary difference between an array and a list in Python? A) Arrays can contain mixed data types, while lists cannot. B) Lists are faster for numerical operations compared to arrays. C) Arrays can be resized dynamically, while lists have a fixed size. D) The primary difference is that arrays store elements of the same type, while lists can store elements of different types. Show Answer Correct Answer: D) The primary difference is that arrays store elements of the same type, while lists can store elements of different types. 12. If two trees have same structure and node content, then they arecalled A) Synonyms trees. B) Joint trees. C) Equivalent trees. D) Similar trees. Show Answer Correct Answer: C) Equivalent trees. 13. What is the time complexity of the dynamic programming implementation of the longest common subsequence problem where length of one string is "m" and the length of the other string is "n" ? A) O(n). B) O(m). C) O (m + n). D) O(mn). Show Answer Correct Answer: D) O(mn). 14. The number of edges from the root to the node is called ..... of the tree. A) Height. B) Depth. C) Length. D) Width. Show Answer Correct Answer: B) Depth. 15. What method in Python is used to remove the last element from a list? A) Delete(). B) Clear(). C) Pop(). D) Remove(). Show Answer Correct Answer: C) Pop(). 16. Binary TREE A) Data structure similar to a graph, with no loops. B) An object in a graph also known as a vertex. C) A join of relationship between nodes-also know as an arc. D) A tree where each node can only have 2 child nodes attached to it. Show Answer Correct Answer: D) A tree where each node can only have 2 child nodes attached to it. 17. A B-tree of order 4 and of height 3 will have a maximum of ..... keys. A) 255. B) 63. C) 127. D) 188. Show Answer Correct Answer: A) 255. 18. Arrays have a fixed number of items.True or False A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 19. (A) Non primitive data structures are more complex data structures.(R) Non primitive data structures are derived from the user defined data structure A) Both A and B are false. B) A is false and B is treu. C) A is true and B is false. D) Both A and B are true. Show Answer Correct Answer: D) Both A and B are true. 20. ..... technique doesn't give guarantee that our solution is optimal A) Greedy method. B) Dynamic programming approach. C) Backtracking. D) Branch and bound. Show Answer Correct Answer: A) Greedy method. 21. Assertion(A):A tree is non-linear data structure. Reason (R):In non-linear data structure data items are connected to many other data items. A) A is true R is false. B) A is true R is correct explanation. C) A is false R is correct. D) Bothe A and R is false. Show Answer Correct Answer: B) A is true R is correct explanation. 22. How do you access the value associated with a specific key in a dictionary? A) Dictionary.get(key). B) Dictionary[key]. C) Dictionary[key] = value. D) Dictionary.value(key). Show Answer Correct Answer: B) Dictionary[key]. 23. Which of the following are the tree traversal A) Hashing. B) Defense first search. C) Bottom first search. D) Depth first search. Show Answer Correct Answer: D) Depth first search. 24. Which of the following data structures is best suited for implementing a stack? A) Array. B) Linked List. C) Queue. D) Tree. Show Answer Correct Answer: B) Linked List. 25. What is a nonlinear data structure? Provide an example. A) An example of a nonlinear data structure is a queue. B) An example of a nonlinear data structure is a binary tree. C) An example of a nonlinear data structure is a linked list. D) An example of a nonlinear data structure is a stack. Show Answer Correct Answer: B) An example of a nonlinear data structure is a binary tree. ← 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 9Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books