This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 23 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 23 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following is used to declare, construct, and initialize an array? A) Int arr [] [] = \{1, 2, 3, 4\};. B) Int [] arr = (1, 2, 3);. C) Int [] arr = \{\};. D) Int arr [] = \{1, 2, 3\};. Show Answer Correct Answer: D) Int arr [] = \{1, 2, 3\};. 2. Main Operations in Queue are Called A) Enqueue and Dequeue. B) Append and Insertion. C) Push and Pop. D) Append and traverse. Show Answer Correct Answer: A) Enqueue and Dequeue. 3. What method would you use to remove a key from a dictionary? A) Use 'remove()' method. B) Use 'del' or 'pop()' method. C) Use 'discard()' method. D) Use 'clear()' method. Show Answer Correct Answer: B) Use 'del' or 'pop()' method. 4. How are arrays indexed? A) Randomly. B) Starting at 1. C) Alphabetically. D) Starting at 0. Show Answer Correct Answer: D) Starting at 0. 5. Which one of the following is an application of Queue Data Structure? A) When a resource is shared among multiple consumers. B) When data is transferred asynchronously (data not necessarily received at same rate as sent) between two processes. C) Process Scheduling. D) All the above. Show Answer Correct Answer: D) All the above. 6. What method can you use to get all the values from a dictionary? A) Dictionary.values(). B) Dictionary.allValues(). C) Dictionary.getAll(). D) Dictionary.items(). Show Answer Correct Answer: A) Dictionary.values(). 7. A variant of linked list in which last node of the list points to the first node of the list is? A) Singly linked list. B) Doubly linked list. C) Circular linked list. D) None of the above. Show Answer Correct Answer: C) Circular linked list. 8. What methods can be used to access values in a dictionary? A) Use the key, the get() method, or iterate through the dictionary. B) Access via index, the fetch() method, or filter the dictionary. C) Use the value directly, the find() method, or sort the dictionary. D) Utilize the item, the retrieve() method, or map through the dictionary. Show Answer Correct Answer: A) Use the key, the get() method, or iterate through the dictionary. 9. Searching of any element in a data structure can be done in 2 ways ..... and ..... A) Sequential and random. B) Linear and non linear. C) Linear and binary. D) Linear and random. Show Answer Correct Answer: C) Linear and binary. 10. Whoose responsibility is to choose the right data structure? A) Programmer. B) Manager. C) System Analysts. D) None of the above. Show Answer Correct Answer: A) Programmer. 11. A Balanced Tree has equal number of items on each subtree. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 12. What is the primary advantage of using functions in programming according to the fundamental principles of software development? A) Functions allow code reusability and reduce repetition. B) Functions automatically fix bugs in code. C) Functions make programs run faster. D) Functions make variables global by default. Show Answer Correct Answer: A) Functions allow code reusability and reduce repetition. 13. Inserting an element is ..... A) Add. B) Ins. C) Push. D) Pop. Show Answer Correct Answer: C) Push. 14. Routine to delete element in an array implementation of List A) For(i=pos-1;i B) For(i=pos-1;i C) For(i=pos-1;i D) For(i=pos-1;i Show Answer Correct Answer: C) For(i=pos-1;i 15. Which of the following statement(s) about stack data structure is/are NOT correct? A) Top of the Stack always contain the new node. B) Stack is the FIFO data structure. C) Null link is present in the last node at the bottom of the stack. D) Linked List are used for implementing Stacks. Show Answer Correct Answer: B) Stack is the FIFO data structure. 16. Collection of related field or items is called A) Record. B) File. C) A &B. D) None of the above. Show Answer Correct Answer: B) File. 17. Why are sets useful? A) They ensure all values remain unique. B) They keep values in order. C) They store key-value pairs. D) They preserve duplicates. Show Answer Correct Answer: A) They ensure all values remain unique. 18. When analyzing the syntax 'def fun():', what would happen if you wrote 'def fun' without the parentheses and colon? A) The function would work normally. B) Python would throw a syntax error. C) Python would create a variable instead of a function. D) The function would only work once. Show Answer Correct Answer: B) Python would throw a syntax error. 19. In the context of 'String slicing' mentioned in activity 14, what advantage does this provide in function implementation? A) It converts strings to integers. B) It makes strings immutable. C) It allows access to specific portions of strings without loops. D) It automatically sorts string characters. Show Answer Correct Answer: C) It allows access to specific portions of strings without loops. 20. Which of these data structures is FIFO? A) Stack. B) Queue. C) Binary Tree. D) Linked List. Show Answer Correct Answer: B) Queue. 21. In a circular queue, how do you calculate the length of the queue? A) Rear-Front + 1. B) Rear-Front. C) Size of the array-(Front-Rear). D) Rear-Front-1. Show Answer Correct Answer: A) Rear-Front + 1. 22. What method would you use to add an element to a list? A) Use the 'append()' method. B) Use the 'extend()' method. C) Use the 'add()' method. D) Use the 'insert()' method. Show Answer Correct Answer: A) Use the 'append()' method. 23. Which of the following rotations is called double rotation? A) RR and LR. B) LL and RL. C) LL and RR. D) LR and RL. Show Answer Correct Answer: D) LR and RL. 24. What is the information, which a LinkedList's Node must store? A) The address of the next node if it exists. B) The value of the current node. C) Both (A) and (B). D) None of the above. Show Answer Correct Answer: C) Both (A) and (B). 25. Time complexity of matrix multiplication: A) O(n). B) O(log n). C) O(n$^{3}$). D) O(n$^{2}$). Show Answer Correct Answer: C) O(n$^{3}$). ← 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