89. Circular Buffer-I

Question.6

A circular buffer (capacity=4) contains [80, 90, 100, 110] with head=0, tail=0, count=4. A developer calls:

buffer_peek(&cb, &val1);   // Peek
buffer_pop(&cb, &val2);    // Pop
buffer_peek(&cb, &val3);   // Peek again

What are the values of val1, val2, and val3?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!