Question: Use c + + You are a given a queue Q A with integers. The object of your program is to transfer all
Use c You are a given a queue with integers. The object of your program is to transfer all the data from queue using the following rule.
a All odd numbers goes to a queue.
b All even numbers goes to a stack.
c If it is it is does not go either into a queue or stack.
NOTE: Assume that there is data in queue QA Make sure that the original set up is retained.
Write a COMPLETE main code to accomplish the above task using ONLY the STACK & QUEUE functions given in table below to get full grade.
tablein table below to get full grade.,QUEUE CLASSSTACK CLASStablestruct st int a; st next; ;class stack private: stack top;public: stack;stack;void pushint c;int pop;bool isempty;bool isfull; ;
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
