Example HTML page

# DS- mcq on Queue

The following are the objective questions on the topic related to Queues in data structures using C/C++.

1.What kind of a datastructure does a queue is?

1. Linear
2. B non-linear
3. both A&B
4. none

2. What is the operation we perform on Queues?

1. FIRST-IN –LAST-OUT
2. FIRST-IN-FIRST-OUT
3. BOTH A&B
4. NO

3.Which one of the following terms we use to mention the number of elements that a queue can hold?

1. LENGTH
2. SIZE
3. CAPACITY
4. DATA

4. In Queues, we can insert an element at ___ end and can delete an element at ____ end.

1. REAR,FRONT
2. FRONT,REAR
3. TOP,BOTTOM
4. BOTTOM, TOP

5. Similarly in DEQUEUEs, insertion is performed at ___ end whereas the deletion is performed at __ end.

1.  FRONT, REAR
2. REAR, FRONT.
3. Both A & B
4. None of the above

6. _____ helps us to implement Breadth First Traversal on a graph.

1.  Stack.
2. Arrays
3. Queues

7.Consider P,Q,R and S are the four elements in a queue. If we delete an element at a time then on which order they will get deleted?

1. PQRS
2. SRQP
3. PSQR
4. SRQP

8.A circular queue is implemented using an array of size 10. The array index starts with 0, front is 6, and rear is 9. The insertion of next element takes place at the array index of__.

1.  0
2. 7
3. 9
4. 10

9.If the MAX_SIZE is the size of the array used in the implementation of circular queue, assume array index start with 0, front points towards the first element in the queue, and rear points towards the last element in the queue. Which of the following condition specify that circular queue is FULL?

1. Front=rear= -1
2. Front=(rear+1)%MAX_SIZE
3. Rear=front+1
4. Rear=(front+1)%MAX_SIZE

10.In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into a NONEMPTY queue?

1. Only front pointer
2. Only rear pointer
3. Both front and rear pointer
4. None of the front and rear pointer

11.What is the worst case time complexity of a sequence of n queue operations on an initially empty queue?

1. θ (n)
2. θ (n + k)
3. θ (nk)
4. θ (n2)

12.The implementation of Radix sort can be done with the help of ____.

2. Stack
3. Queue
4. Possible with all the above.

13.Which one of the following is an application(s) of Queue Data Structure?

1. When a resource is shared among multiple consumers
2. When data is transferred asynchronously between the two processes.
4. all the above

14. How many stacks are needed to implement a queue?

1.  1
2. 2
3. 3
4. 4

15.In Queue, ENQUEUE means____ whereas DEQUEUE refers____.

1. an insertion operation, a deletion operation.
2. End of the queue, defining a queue.
3. Both A and B.
4. None of the above are true.