Can someone please double check to make sure I have theseright. Here are the ins
ID: 3618954 • Letter: C
Question
Can someone please double check to make sure I have theseright. Here are the instructions...Assume that q is a queue implemented as described using circulararray with queueElement = char and capacity 5, and then ch is oftype char. Show the values of myFront and myBack and thecontents of myArray for the Queue object q after the programsegment has been executed, also indicate any errors thatoccur...
1.
q.enqueue('X');
q.enqueue('Y');
q.enqueue('Z');
while (!q.empty())
{
ch = q.front();
q.dequeue();
}
For this one I put myFront = 3 and myBack = 4 but dont know what yodo for myArray
3.
ch = 'A';
for (int i = 1; i <=4; i++)
{
q.enqueue(ch);
ch++;
q.enqueue(ch);
ch = q.front();
q.dequeue();
}
For this one I put myFront = 1, myBack = 4 and also not sure whatto pout for myArray...can someone please take a look and offerassistance. I need this to be looked at by 5. Iapologize for the short notice.
Explanation / Answer
can someone please take a look at this