Multiple choice

In a circular queue of size MAXQUEUE, overflow occurs at

  1. before incrementing rear, rear = front

  2. after incrementing rear, rear = front

  3. before incrementing rear, rear = front +1

  4. after incrementing rear, rear = front +1

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In a circular queue, the condition for overflow is typically checked after incrementing the rear pointer. If the incremented rear pointer equals the front pointer, the queue is full.