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 "QA" with integers. The object of your program is to transfer all the data from queue "A" using the following rule.
a. All odd numbers goes to a queue.
b. All even numbers goes to a stack.
c. If it is 0 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.
\table[[in table below to get full grade.,QUEUE CLASS],[STACK CLASS],[\table[[struct st],[{ int a; st *next; };],[class stack],[{ private: stack *top;],[public: stack();],[stack();],[void push(int c);],[int pop();],[bool isempty();],[bool isfull(); };]],]]
Use c + + You are a given a queue " Q A " with

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!