Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 12 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which data structure is needed to convert infix notation to postfix notation?
2. What does the .append() function do in Python Lists?
3. Which sorting algorithm is known for its average time complexity of O(n log n)?
4. How can you merge two dictionaries in Python?
5. How do you raise an exception in Python?
6. Can I put different data types into a set?
7. What will be the output of the program?class Main\{public static void main(String args[]) \{int arr[] = \{10, 20, 30, 40, 50\};for(int i=0; i < arr.length; i++)\{System.out.print(" '' + arr[i]);\}\}\}
8. The front and rear pointers of a queue are monitored in a linked list implementation. During an insertion into a NONEMPTY queue, which of these pointers would change?
9. What is the syntax for creating a tuple in Python?
10. Assertion (A):A queue is a FIFO data structure.Reason (R):Addition and deletion of items takes place at same end.
11. How can you use comprehension with tuples?
12. How can you remove an item from a list by its value?
13. Which data structure allows deleting data elements from front and inserting from rear?
14. Which of the following is NOT a typical use case for a queue?
15. What methods can be used with dictionaries?
16. Arrays can have different data types?True or False?
17. Identify the data structure which allows deletions at both ends of the list but insertion at only one end.
18. What are the key-value pairs in a dictionary?
19. Which syntax correctly creates a set?
20. Records would typically be seen in use with which type of software?
21. What does the following function do for a given Linked List with first node as head? void fun1(struct node* head)\{ if(head == NULL) return; fun1(head$\rightarrow$next); printf("%d ", head$\rightarrow$data);\}
22. Which of the following principle does queue use?
23. How do you iterate over a dictionary's keys and values?
24. What are the advantages of using a set over a list?
25. How many stacks are required for reversing a word algorithm?