Question: you were given the source code for building a queue data structure based on an array. You are given this source code ( assign 4
you were given the source code for building a queue data structure based on an array. You
are given this source code assignpartcpp but it misses the implementation of the oddCheck
function. You are asked to provide the implementation of this function as described below.
The oddCheck inspects all values in the queues and prints only the odd values. #include
using namespace std;
const int MAXSIZE ;
int queueMAXSIZE;
int front rear ;
bool queueIsEmpty
iffront
return true;
else
return false;
bool queueIsFull
ifrearMAXSIZE front
return true;
else
return false;
int peek
return queuefront;
void enqueueint data
ifqueueIsFull
iffront
front ;
rear ;
else
rear rear MAXSIZE;
queuerear data;
else
cout "Queue is full" endl;
int dequeue
int data queuefront;
iffront rear
rear ;
front ;
else
front front MAXSIZE;
return data;
void printQueue
ifqueueIsEmpty
int i ;
fori front; i rear;
cout
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
