Google News
logo
Data Structures - Quiz(MCQ)
Which one of the following is the overflow condition if linear queue is implemented using an array with a size MAX_SIZE?
A)
rear = front
B)
rear = MAX_SIZE
C)
rear = front+1
D)
rear=MAX_SIZE -1

Correct Answer :   rear=MAX_SIZE -1


Explanation : rear=MAX_SIZE-1. As the size of the array is MAX_SIZE, so we can insert the elements till MAX_SIZE-1. If we try to insert the elements of size MAX_SIZE or more than MAX_SIZE in a queue, then it leads to the overflow condition.

Advertisement