queue mcq,queue mcq pdf,queue mcq in data structure,queue mcq with answers pdf,queue mcq with answers,queue mcq pdf,queue mcq pdf download,class 12 queue mcq with answers pdf,class 12 queue mcq with answers,class 12 queue mcq pdf,class 12 queue mcq pdf download,2nd puc queue mcq with answers pdf,2nd puc queue mcq with answers,2nd puc queue mcq pdf download,2nd puc queue mcq pdf
1. What principle does a queue follow?
2. In a queue, the element is inserted at the:
3. What happens when you try to dequeue from an empty queue?
4. Which operation is used to add an element to a queue?
5. In a queue implemented with a Python list, myQueue.pop(0) removes the element from:
6. What does the isEmpty() function check in a queue?
7. In the context of a printer, how are print jobs managed?
8. Which Python function is used to insert an element at the rear in a queue?
9. The peek() operation in queue is used to:
10. In the bank queue example, which operation is used when a person enters the queue?
11. Which of the following is NOT required in Python while implementing a queue using a list?
12. What is a deque?
13. Which operation removes an element from the rear of a deque?
14. If you insert and delete elements from the same end in a deque, it behaves as a:
15. What is the output of getRear(myDeque) if myDeque = [23, 45, 67]?
16. In palindrome checking using deque, characters are compared from:
17. What does myDeque.insert(0, element) do in deque?
18. In Python, what will pop() do if no index is given in a list?
19. In a multitasking OS, how are jobs scheduled if FIFO is used?
20. Which operation would you perform to add an element at the front of a deque?
21. Assertion (A): In a queue, the first element added is the first one to be removed. Reason (R): Queue follows Last-In-First-Out (LIFO) order.
22. Assertion (A): Enqueue operation in a queue adds an element to the rear end. Reason (R): Python’s append() function adds elements at the end of a list.
23. Assertion (A): Deleting from an empty queue results in an Overflow. Reason (R): Overflow happens when insertion is attempted in a full queue.
24. Assertion (A): isEmpty() is necessary before performing dequeue in a queue. Reason (R): Dequeue should only be performed when the queue is not empty to avoid underflow.
25. Assertion (A): Queue can be implemented using Python’s tuple. Reason (R): Tuples are mutable and support deletion and insertion at both ends.
26. Assertion (A): Web servers use queues to manage multiple requests. Reason (R): A server can only serve one request at a time and queues allow orderly handling.
27. Assertion (A): peek() operation modifies the queue by removing the front element. Reason (R): peek() is similar to dequeue().
28. Assertion (A): A deque allows insertion and deletion from both ends. Reason (R): Deque can be used to simulate both queue and stack behavior.
29. Assertion (A): A queue implemented in Python using a list can never overflow. Reason (R): Lists in Python have dynamic sizing and can grow as needed.
30. Assertion (A): In a normal queue, insertion and deletion happen from opposite ends. Reason (R): This differentiates a queue from a stack where both happen from the same end.
31. Assertion (A): insertFront() in deque adds an element to index 0. Reason (R): In Python, insert(0, element) places the element at the front of a list.
31. Assertion (A): insertFront() in deque adds an element to index 0. Reason (R): In Python, insert(0, element) places the element at the front of a list.
32. Assertion (A): Deletion from both ends in a deque is not allowed. Reason (R): Deque behaves like a normal queue.
33. Assertion (A): Palindrome checking can be efficiently done using a deque. Reason (R): Deque allows comparing characters from front and rear ends.
34. Assertion (A): getFront() and getRear() both modify the contents of a deque. Reason (R): They use pop() and insert() operations.
35. Assertion (A): Job scheduling in operating systems can be based on queues. Reason (R): FIFO strategy ensures fair processing order.
36. Assertion (A): In deque, deletionRear() uses pop() without any arguments. Reason (R): This removes the last element in the list.
37. Assertion (A): All operations in deque can be implemented using only append() and pop() in Python. Reason (R): Python lists allow only rear-end insertion and deletion.
38. Assertion (A): size() function returns the number of elements in a queue. Reason (R): It uses Python’s built-in len() function.
39. Assertion (A): A deque can behave as both a queue and a stack. Reason (R): It supports insertion and deletion from both ends.
40. Assertion (A): Overflow can happen in a queue implemented using Python lists. Reason (R): Python lists are statically sized like arrays.

No comments: