google.com, pub-6167773875660516, DIRECT, f08c47fec0942fa0 queue mcq with answers | queue mcq in data structure - 2nd puc computer science

queue mcq with answers | queue mcq in data structure

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

queue mcq with answers

1. What principle does a queue follow?





ANSWER= C) FIFO

2. In a queue, the element is inserted at the:





ANSWER= C) Rear

3. What happens when you try to dequeue from an empty queue?





ANSWER= C) Underflow

4. Which operation is used to add an element to a queue?





ANSWER= D) Enqueue

5. In a queue implemented with a Python list, myQueue.pop(0) removes the element from:





ANSWER= C) Front

6. What does the isEmpty() function check in a queue?





ANSWER= D) Queue is empty

7. In the context of a printer, how are print jobs managed?





ANSWER= B) FIFO

8. Which Python function is used to insert an element at the rear in a queue?





ANSWER= D) push()

9. The peek() operation in queue is used to:





ANSWER= C) View the front element without deleting

10. In the bank queue example, which operation is used when a person enters the queue?





ANSWER= D) Enqueue

11. Which of the following is NOT required in Python while implementing a queue using a list?





ANSWER= A) isFull()

12. What is a deque?





ANSWER= C) Double-ended queue

13. Which operation removes an element from the rear of a deque?





ANSWER= C) deletionRear

14. If you insert and delete elements from the same end in a deque, it behaves as a:





ANSWER= B) Stack

15. What is the output of getRear(myDeque) if myDeque = [23, 45, 67]?





ANSWER= C) 67

16. In palindrome checking using deque, characters are compared from:





ANSWER= C) Front and Rear

17. What does myDeque.insert(0, element) do in deque?





ANSWER= B) Inserts at front

18. In Python, what will pop() do if no index is given in a list?





ANSWER= B) Removes last

19. In a multitasking OS, how are jobs scheduled if FIFO is used?





ANSWER= C) Jobs are processed in the order they arrive

20. Which operation would you perform to add an element at the front of a deque?





ANSWER= C) insertFront()

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.





ANSWER= C) A is true, but R is false.

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.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

23. Assertion (A): Deleting from an empty queue results in an Overflow. Reason (R): Overflow happens when insertion is attempted in a full queue.





ANSWER= D) A is false, but R is true.

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.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

25. Assertion (A): Queue can be implemented using Python’s tuple. Reason (R): Tuples are mutable and support deletion and insertion at both ends.





ANSWER= D) A is false, but R is false.

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.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

27. Assertion (A): peek() operation modifies the queue by removing the front element. Reason (R): peek() is similar to dequeue().





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

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.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

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.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

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.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

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.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

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.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

32. Assertion (A): Deletion from both ends in a deque is not allowed. Reason (R): Deque behaves like a normal queue.





ANSWER= D) Both A and R are false.

33. Assertion (A): Palindrome checking can be efficiently done using a deque. Reason (R): Deque allows comparing characters from front and rear ends.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

34. Assertion (A): getFront() and getRear() both modify the contents of a deque. Reason (R): They use pop() and insert() operations.





ANSWER= D) Both A and R are false.

35. Assertion (A): Job scheduling in operating systems can be based on queues. Reason (R): FIFO strategy ensures fair processing order.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

36. Assertion (A): In deque, deletionRear() uses pop() without any arguments. Reason (R): This removes the last element in the list.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

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.





ANSWER= C) A is true, but R is false.

38. Assertion (A): size() function returns the number of elements in a queue. Reason (R): It uses Python’s built-in len() function.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

39. Assertion (A): A deque can behave as both a queue and a stack. Reason (R): It supports insertion and deletion from both ends.





ANSWER= A) Both A and R are true, and R is the correct explanation of A.

40. Assertion (A): Overflow can happen in a queue implemented using Python lists. Reason (R): Python lists are statically sized like arrays.





ANSWER= D) Both A and R are false.

queue mcq with answers | queue mcq in data structure queue mcq with answers | queue mcq in data structure Reviewed by Vision Academy on July 11, 2025 Rating: 5

No comments:

CheckOut

Powered by Blogger.