This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 6 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 6 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What are hash tables and how do they work? A) Hash tables are data structures that use a hash function to map keys to values for efficient data retrieval. B) Hash tables are a type of linked list that organizes data sequentially. C) Hash tables are used for storing images and videos in databases. D) Hash tables are primarily designed for sorting large datasets efficiently. Show Answer Correct Answer: A) Hash tables are data structures that use a hash function to map keys to values for efficient data retrieval. 2. What is the advantage of a hash table as a data structure? A) Easy to implement. B) Faster access of data. C) Exhibit good locality of reference. D) Very efficient for less number of entries. Show Answer Correct Answer: B) Faster access of data. 3. The result of evaluating the postfix expression 5, 4, 6, +, *, 4, 9, 3, /, +, * is A) 600. B) 250. C) 400. D) 350. Show Answer Correct Answer: D) 350. 4. What is a data structure? A) A type of software. B) A programming language. C) A computer hardware component. D) A specialized format for organizing and storing data. Show Answer Correct Answer: D) A specialized format for organizing and storing data. 5. Linked list is considered as an example of ..... type of memory allocation. A) Dynamic. B) Static. C) Compile time. D) None of the mentioned. Show Answer Correct Answer: A) Dynamic. 6. In linked list implementation of a queue, where does a new element be inserted? A) At the head of link list. B) At the tail of the link list. C) At the centre position in the link list. D) None. Show Answer Correct Answer: B) At the tail of the link list. 7. Which of the following is useful in traversing a given graph by breadth first search? A) Op 1:stack. B) Op 2:set. C) Op 3:list. D) Op 4:queue. Show Answer Correct Answer: D) Op 4:queue. 8. What will the output of the following code snippet?void solve() \{ int a[] = \{1, 2, 3, 4, 5\}; int sum = 0; for(int i = 0; i < 5; i++) \{ if(i % 2 == 0) \{ sum += *(a + i); \} else \{ sum-= *(a + i); \} \} cout << sum << endl;\} A) 15. B) Syntax error. C) 3. D) 2. Show Answer Correct Answer: C) 3. 9. Which of the following is an example of a constant in Python? A) Pi = 3.14159. B) X = 5. C) My string = "Hello, World!". D) None of the above. Show Answer Correct Answer: D) None of the above. 10. How may index numbers are used in accessing a 2D array? A) 1. B) 2. C) 3. D) 4. Show Answer Correct Answer: B) 2. 11. N elements of a Queue are to be reversed using another queue. The number of "ADD" and "REMOVE"operations required to do so is: A) 2*n. B) 4*n. C) N. D) The task cannot be accomplished. Show Answer Correct Answer: D) The task cannot be accomplished. 12. Which of these tree traversal methods is used to output the contents of a binary tree in ascending order? A) Pre-Order. B) In-Order. C) Post-Order. D) Monastic Orders. Show Answer Correct Answer: B) In-Order. 13. With what data structure can a priority queue be implemented? A) Array. B) List. C) Heap. D) Tree. Show Answer Correct Answer: C) Heap. 14. In this type of search, a sequential search is made over all items one by one. A) Search. B) Binary Search. C) Linear Search. D) None of the above. Show Answer Correct Answer: C) Linear Search. 15. What do you call a collection of items stored at contiguous memory locations? A) Linked List. B) Linear List. C) Array. D) Data Structure. Show Answer Correct Answer: C) Array. 16. How do you implement a queue using two stacks? A) By using one stack for enqueue operations and another for dequeue operations, transferring elements as needed. B) By using both stacks for enqueue operations and only one for dequeue operations. C) By using a single stack and reversing the order of elements for dequeue operations. D) By using a circular linked list to simulate the behavior of a queue. Show Answer Correct Answer: A) By using one stack for enqueue operations and another for dequeue operations, transferring elements as needed. 17. Heap can be used as ..... A) Priority queue. B) Stack. C) A decreasing order array. D) Normal Array. Show Answer Correct Answer: A) Priority queue. 18. Consider the following operation performed on a stack of size 5. Push(1); Pop(); Push(2); Push(3); Pop(); Push(4); Pop(); Pop(); Push(5); A) 4. B) 3. C) 2. D) 1. Show Answer Correct Answer: D) 1. 19. For the 'Calculating Distance' activity that uses 'input() function', what data type conversion is most likely needed? A) No conversion is needed. B) Convert input to boolean for logical operations. C) Convert input to integer or float for mathematical operations. D) Convert input to list for iteration. Show Answer Correct Answer: C) Convert input to integer or float for mathematical operations. 20. The no of external nodes in a full binary tree with n internal nodes is? A) N. B) N+1. C) 2n. D) 2n+1. Show Answer Correct Answer: B) N+1. 21. How can you check if a key exists in a dictionary? A) Use 'dictionary.contains(key)'. B) Use 'key in dictionary' or 'dictionary.get(key)'. C) Use 'dictionary.has key(key)'. D) Check 'key in list'. Show Answer Correct Answer: B) Use 'key in dictionary' or 'dictionary.get(key)'. 22. Can I remove a element from a tuple once created? A) Yes, tuples have mutable values. B) No, tuples are immutable once created. C) Why is tulip spelled weird?. D) Idk you tell me. Show Answer Correct Answer: B) No, tuples are immutable once created. 23. Which data structure is best for storing matrices? A) Stack. B) Array. C) Tree. D) Queue. Show Answer Correct Answer: B) Array. 24. Below is a stack operationint x = a[top ..... ]; return x;if top becomes zero, then what is that condition called? A) Overflow. B) Underflow. C) Pop. D) Push. Show Answer Correct Answer: B) Underflow. 25. Which of the following is NOT a Type of Data Structures? A) Arrays. B) Tables. C) Stacks. D) Trees. Show Answer Correct Answer: B) Tables. ← 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 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 10Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books