← Quiz: Stack and Queue in C: all 10 questions
Quiz: Stack and Queue in C · Question 5 of 10
In a circular queue of size 5, rear is 4. Where does the next enqueue go (if not full)?
In a circular queue of size 5, rear is 4. Where does the next enqueue go (if not full)?
- A.Index 5
- B.Index 0
- C.Index 4 again
- D.It always overflows
Answer & explanation
Correct answer: Index 0
(4 + 1) % 5 = 0, so rear wraps around to the start.
Can you get the rest right without peeking?
Take the timed Quiz: Stack and Queue in C quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →