What is the output of the following program?
#include#include #include “myStack.h”using namespace std;template void mystery(stackType & s, stackType & t); int main ( ){stackType s1;stackType s2;string list [ ] = {“Winter”, “Spring”, “Summer”, “Fall”, “Cold”, “Warm”, “Hot”};for (int i=0; i<7; i++)s1.push(list[i]);mystery(s1, s2);while (!s2.isEmptyStack ( )){cout ≪ s2.top ( ) ≪ “ ”;s2.pop ( );}cout ≪ end1;}template void mystery(stackType & s, stackType & t){while (!s.isEmptyStack ( )){t.push(s.top ( )); s.pop ( );}}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.