This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 32 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 32 (17 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. The term push and pop is related to A) Array. B) List. C) Stack. D) Queue. Show Answer Correct Answer: C) Stack. 2. Stack performs ..... operation A) PUSH. B) POP. C) Both of the above. D) None of the above. Show Answer Correct Answer: C) Both of the above. 3. Which data structure is used for implementing recursion? A) Stack. B) List. C) Queue. D) Array. Show Answer Correct Answer: A) Stack. 4. What is the speciality about the inorder traversal of a binary search tree? A) It traverses in a non increasing order. B) It traverses in an increasing order. C) It traverses in a random fashion. D) It traverses based on priority of the node. Show Answer Correct Answer: B) It traverses in an increasing order. 5. What are the two main classifications of data structures? A) Ordered and Unordered. B) Simple and Complex. C) Static and Dynamic. D) Linear and Non-linear. Show Answer Correct Answer: D) Linear and Non-linear. 6. How do you check if a list is empty in Python? A) If not list:. B) If list == []:. C) If len(list) == 0:. D) All of the above. Show Answer Correct Answer: D) All of the above. 7. Which of the following is the correct index range for a zero-based indexed array of size 10 in most programming languages (like C, Java, Python)? A) 0 to 9. B) 1 to 10. C) 0 to 10. D) 1 to 9. Show Answer Correct Answer: A) 0 to 9. 8. The algorithm is completed when the statement ..... is encountered. A) Return. B) Finish. C) EXIT. D) None of the above. Show Answer Correct Answer: C) EXIT. 9. Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity? A) Insertion Sort. B) Quick Sort. C) Heap Sort. D) Merge Sort. Show Answer Correct Answer: D) Merge Sort. 10. What is the disadvantage of array data structure? A) Elements of an array can be accessed in constant time. B) The amount of memory to be allocated should be known beforehand. C) Elements are stored in contiguous memory blocks. D) Multiple other data structures can be implemented using arrays. Show Answer Correct Answer: B) The amount of memory to be allocated should be known beforehand. 11. Which of the following data structures can be used to implement queues? A) Stack. B) Arrays. C) LinkedList. D) All of the Above. Show Answer Correct Answer: D) All of the Above. 12. Int is ..... data type. A) User defined. B) Derived. C) Primary. D) All of above. Show Answer Correct Answer: C) Primary. 13. How many children does a binary tree have? A) 2. B) Any number of children. C) 0 or 1 or 2. D) 0 or 1. Show Answer Correct Answer: C) 0 or 1 or 2. 14. What method in Python is used to remove an element from a set? A) Delete(). B) Discard(). C) Pop(). D) Remove(). Show Answer Correct Answer: D) Remove(). 15. What is the output of following function for start pointing to first node of following linked list? 1$\rightarrow$2$\rightarrow$3$\rightarrow$4$\rightarrow$5$\rightarrow$6 void fun(struct node* start) \{ if(start == NULL) return; printf("%d ", start$\rightarrow$data); if(start$\rightarrow$next != NULL ) fun(start$\rightarrow$next$\rightarrow$next); printf("%d ", start$\rightarrow$data); \} A) 1 4 6 6 4 1. B) 1 3 5 1 3 5. C) 1 2 3 5. D) 1 3 5 5 3 1. Show Answer Correct Answer: D) 1 3 5 5 3 1. 16. What does the .pop(key) function do in Python Dictionaries? A) Prints out all the keys within the Dictionary. B) Prints out all the values within the Dictionary. C) Removes the requested key with its value from the Dictionary. D) Returns the number of items in the Dictionary. Show Answer Correct Answer: C) Removes the requested key with its value from the Dictionary. 17. How will you find the minimum element in a binary search tree? A) While(root.left() != null) \{ root = root.left(); \} System.out.println(root.data());. B) While(root != null) \{ root = root.left(); \} System.out.println(root.data());. C) While(root.right() != null) \{ root = root.right(); \} System.out.println(root.data());. D) While(root != null) \{ root = root.right(); \} System.out.println(root.data());. Show Answer Correct Answer: A) While(root.left() != null) \{ root = root.left(); \} System.out.println(root.data());. ← PreviousRelated 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