logo

Crowdly

Consider and empty queue Q, implemented with a circular array of N = 2 positi...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Consider

and empty

queue

Q, implemented with a circular array of N = 2 positions. What

is the output of the following piece of code? Choose one answer.

Queue

<char> q; q.

enqueue (‘h’); q. enqueue (‘i’); q. enqueue (‘o’); q. enqueue (‘u’); q.

dequeue(); q. enqueue (‘t’); q. enqueue (‘p’); q. dequeue(); q. enqueue (‘a’);

cout<<

queue.peek();

More questions like this

Want instant access to all verified answers on curs.upb.ro?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!