🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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)?

  1. A.Index 5
  2. B.Index 0
  3. C.Index 4 again
  4. 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 →