CHAPTER - 4.
QUEUE
1. Which of the following is an ordered linear list of elements having different ends
for adding and removing elements in it?
a) Stack b) Queue c) Searching d) Sorting
2. An arrangement of linear data structure in which addition and removal of elements
can happen from any end is known as
a) Stack b) Queue c) Deque d) Enqueue
3. Following is a linear list of elements in which insertion and deletion takes place
from different ends.
a) Stack b) Queue c) Searching d) Sorting
4. What is the working principle of queue?
a) LIFO b) FIFO c) FILO d) LILO
5. With respect to queue data structure which of the below statement is true?
a) Addition and removal of elements take place at front end
b) Addition and removal of elements take place at rear end
c) Addition of element is at rear end and removal of elements from the front end
d) Addition of element is at front end and removal of elements from the rear end
6. Which of the below statement is not correct with respect to queue?
a) Queue is a linear list of elements.
b) Operations on Queue are performed in FIFO order.
c) Insertion operation in queue is called Enqueue.
d) Deletion operation in queue is called pop.
7. Which data structure is used to insert and delete elements in FIFO order?
a) Stack b) Queue c) Searching d) Sorting
8. In which order elements of queue are accessed?
a) LIFO b) FIFO c) LILO d) FILO
9. Queue follows:
a) LIFO principle b) FIFO principle c) LILO principle d) FILO principle
10. FIFO stands for:
a) First -In-First-Out b) Forward -In-First-out c) First -In-Forward-out
d) Forward -In- Forward -out
11. FCFS stands for:
a) First Come First Service
b) First Count First Served
c) First Come First Served
d) First Come First System
12. FIFO is also called as:
a) FCFS b) LIFO c) FSFC d) FILO
13. At which end, an element can be inserted in queue?
a) Top b) Peek c) Rear d) Front
14. From which end, an element is deleted from queue?
a) Top b) Peek c) Rear d) Front
[Link] elements are inserted into queue in following order ‘A’,’S’,’D’ and ‘F’ and
then elements are removed, in which order elements are removed?
a) ‘A’,’S’,’D’ ,‘F’
b) ‘F’, ’D’, ’S’, ‘A’
c) ‘A’, ‘F’, ’S’, ’D’
d) ’S’,’D’ , ‘A’, ‘F’
[Link] operation is used to insert a new element to the queue at the rear end?
a) Enqueue b) Dequeue c) Isempty d) Peek
[Link] exception will occur when inserting elements beyond capacity of the
queue?
a) Underflow b) Overflow c) Dequeue d) Enqueue
[Link] operation is used to remove one element at a time from the front
of the queue?
a) Enqueue b) Dequeue c) Isempty d) Peek
[Link] exception will occur when trying to delete an element from an
empty queue?
a) Underflow b) Overflow c) Dequeue d) Enqueue
[Link] operation is used to view elements at the front of the queue, without removing
it from the Queue is
a) Enqueue b) Dequeue c) Isempty d) Peek
[Link] operation is used to check whether the queue has any element or not?
a) Enqueue b) Dequeue c) Isempty d) Peek
[Link] operation used to view element at the front of the Queue, without removing it
from the Queue is
a) Enqueue b) Dequeue c) Isempty d) Peek
[Link] operation is used to simply read, but not to delete the element at the
front end of the queue?
a) Enqueue b) Dequeue c) Isempty d) Peek
[Link] operation is used to check whether any more elements can be added to the
queue or not?
a) Enqueue b) Isfull c) Isempty d) Peek
[Link] operation is used to avoid overflow exceptions while performing
enqueue operation?
a) Enqueue b) Isfull c) Isempty d) Peek
[Link] operation is used to avoid underflow exception while performing
dequeue operation?
a) Enqueue b) Isfull c) Isempty d) Peek
[Link] function always adds an element to the rear end of the queue?
a) push b) insert c) append d) add
[Link] is the index of pop method to delete an element from the front end of the
queue?
a) 1 b) 0 c) n d) n-1
[Link] data type is used to implement a queue in Python?
a) Tuple b) Dictionary c) List d) None
[Link] built-in-function (method) is used to create an empty queue?
a) Enqueue( ) b) list( ) c) append( ) d) insert ( )
[Link] built-in-function is used to insert a new element at the end of queue?
a) Enqueue( ) b) list( ) c) append( ) d) insert( )
[Link] built-in-function is used to delete an element from the front of the queue?
a) Enqueue( ) b) pop( ) c) append( ) d) Dequeue( )
[Link] built-in-function is used to check, if the queue has an element or not?
a) isEmpty( ) b) list( ) c) append( ) d) len( )
[Link] built-in-function (method) is used to find the number of elements in
the queue?
a) Enqueue( ) b) isEmpty( ) c) isFull( ) d) len( )
[Link] which condition, queue overflow occurs?
a) Queue is full and Enqueue( ) is called.
b) Queue is empty and Enqueue( ) is called.
c) Queue is full and Dequeue( ) is called.
d) Queue is empty and Dequeue( ) is called.
[Link] which condition, queue underflow exception occurs?
a) Queue is full and Enqueue( ) is called
b) Queue is empty and Enqueue ( ) is called.
c) Queue is full and Dequeue( ) is called.
d) Queue is empty and Dequeue ( ) is called.
[Link] is a version of queue which allows insertion and deletion at
a) front end b) rear end c) both ends d) middle
[Link] of the following is a data structure where elements can be added or
removed at either end, but not in the middle?
a) Enqueue b) Dequeue c) Deque d) Queue
[Link] of the following is an arrangement in which addition and removal of
element(s) can happen from any end?
a) Enqueue b) Dequeue c) Deque d) Queue
[Link] of the following permits insertion and deletion operations from any end?
a) Enqueue b) Dequeue c) Deque d) Queue
[Link] of the following data structure does not apply any restriction on the side
from which addition/removal of elements should happen?
a) Enqueue b) Dequeue c) Deque d) Queue
[Link] of the following is also known as double ended queue?
a) Enqueue b) Dequeue c) Deque d) Queue
[Link] the not correct statement about Deque
a) It is a data structure where elements can be added or removed at either end.
b) Adding or removal of elements can happen in the middle
c) Deque can support both stack and queue operations.
d) Insertfront operation is used to insert new element at the front of the deque.
[Link] operation is used to insert a new element at the front of the deque?
a) Enqueue b) Dequeue c) Insertrear d) Insertfront
[Link] operation is used to insert a new element at the rear of the deque?
a) Enqueue b) Dequeue c) Insertrear d) Insertfront
[Link] operation is used to remove an element from the front of the deque?
a) Enqueue b) Dequeue c) Deletionrear d) Deletionfront
[Link] operation is used to remove one element at a time from the rear
of the deque?
a) Enqueue b) Dequeue c) Deletionrear d) Deletionfront
[Link] built-in-function (method) is used to create an empty deque?
a) Enqueue( ) b) list( ) c) append( ) d) insert( )
[Link] built-in-function (method) is used to insert an element at the front of
deque?
a) Enqueue( ) b) list( ) c) Insertrear( ) d) insert( )
[Link] operation is used to check the presence of element(s) in deque?
a) Enqueue b) Isfull c) Isempty d) Peek
[Link] operation is used to read value from the front of deque, without removing it
from the queue when the queue is not empty?
a) Getfront b) Insertfront c) Deletionrear d) Peek
[Link] operation is used to read value from the rear of the deque, without
removing it from the deque?
a) Getfront b) Getrear c) Deletionrear d) Peek
53. In a deque, if insertion and deletion of elements is done from the same end, it
will behave as
a) Queue b) Stack c) List d) String
54. In a deque, if insertion and deletion of elements is done from the same end, it will
behave as
a) Queue b) Stack c) List d) String
55. Assertion(A):Customers forming a line at the cash counter in a bank is an
example of queue in everyday life
Reason(R):The ordering principle of queue is LIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
56. Assertion(A): Customers forming a line at the cash counter in a bank is an
example of queue in everyday life
Reason(R): The ordering principle of queue is FIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
57. Assertion(A): Queue is a non linear data structure
Reason(R): Insertion and deletion takes place at same end
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is also false
58. Assertion(A):Queue is used to send print commands using a shared printer
Reason(R):The ordering principle of queue is FCFS
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
59. Assertion(A):Queue is used to send print commands using a shared printer
Reason(R):The ordering principle of queue is LIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
60. Assertion(A):Deque is also known as Double ended queue
Reason(R):Deque allows insertion, deletion operation from any end
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
[Link] Answer
1 b) Queue
2 c) Deque
3 b) Queue
4 b) FIFO
5 c) Addition at rear, removal at front
6 d) Deletion... is called pop
7 b) Queue
8 b) FIFO
9 b) FIFO principle
10 a) First-In-First-Out
11 c) First Come First Served
12 a) FCFS
13 c) Rear
14 d) Front
15 a) ‘A’,’S’,’D’,‘F’
16 a) Enqueue
17 b) Overflow
18 b) Dequeue
19 a) Underflow
20 d) Peek
21 c) Isempty
22 d) Peek
23 d) Peek
24 b) Isfull
25 b) Isfull
26 c) Isempty
27 c) append
28 b) 0
29 c) List
30 b) list( )
31 c) append( )
32 b) pop( )
33 d) len( ) (Checks if size == 0)
34 d) len( )
35 a) Queue is full and Enqueue()
36 d) Queue is empty and Dequeue()
37 c) both ends
38 c) Deque
39 c) Deque
40 c) Deque
41 c) Deque
42 c) Deque
43 b) Adding/removal... in the middle
44 d) Insertfront
45 c) Insertrear
46 d) Deletionfront
47 c) Deletionrear
48 b) list( )
49 d) insert( )
50 c) Isempty
51 a) Getfront
52 b) Getrear
53 b) Stack
54 b) Stack
55 b) A is true, R is not correct reason A is true
(Bank line = Queue), but R is false (Queue is FIFO, not
LIFO).
56 a) A is true, R is correct reason
Both are true and R explains why a bank line is a queue.
57 d) A is false, R is also false
A is false (Queue is Linear), R is false (Ends are different).
58 a) A is true, R is correct reason
Both are true; Printers process jobs in the order they arrive (FCFS).
59 b) A is true, R is not correct reason
A is true, but R is false (Printers use FIFO/FCFS, not LIFO).
60 a) A is true, R is correct reason
Both are true and R correctly defines a Deque.