• Data Structure Reference

• Other Reference

# MCQ - Queue in Data Structure

11. A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a ?

A Queue
B Stack
C. Tree

12. The data structure required for Breadth First Traversal on a graph is?

A. Stack
B. Array
C. Queue
D. Tree

13. A queue is a ?

A. FIFO (First In First Out) list
B. LIFO (Last In First Out) list
C. Ordered array
D. Linear tree

14. In Breadth First Search of Graph, which of the following data structure is used?

A. Stack
B. Queue
D. None of the mentioned

15. A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?

A. Queue
B. Circular queue
C. Dequeue
D. Priority queue

16. A normal queue, if implemented using an array of size MAX_SIZE, gets full when

A. Rear = MAX_SIZE – 1
B Front = (rear + 1)mod MAX_SIZE
C. Front = rear + 1
D> Rear = front

17. Queues serve major role in

A. Simulation of recursion
B. Simulation of arbitrary linked list
C. Simulation of limited resource allocation
D. All of the mentioned

18. Which of the following is not the type of queue?

A. Ordinary queue
B. Single ended queue
C. Circular queue
D. Priority queue

19. Which of the following properties is associated with a queue?

A. First In Last Out
B. First In First Out
C. Last In First Out
D. None of the mentioned

20. What does the following piece of code do?

```
public Object function()
{
if(isEmpty())
return -999;
else
{
Object high;
high = q[front];
return high;
}
}
```

A. Dequeue
B. Enqueue
C. Return the front element
D. None of the mentioned