48. 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

Answer: a
Explanation: When Rear = MAX_SIZE – 1, there will be no space left for the elements to be added in queue. Thus queue becomes full.

Leave a Reply

Your email address will not be published.