#include<iostream> #include \"myStack.h\" using namespace std; int main( ) { sta
ID: 3615701 • Letter: #
Question
#include<iostream>#include "myStack.h"
using namespace std;
int main( )
{
stackType<int> intStack(50);
stackType<int> tempStack;
intStack.push(18);
intStack.push(21);
intStack.push(25);
tempStack = intStack;
while(!tempStack.isEmptyStack( ))
{
cout<<tempStack.top( )<<""; //output 1
tempStack.pop( );
}
cout<<endl;
cout<<intStack.top()<<endl; //output 2
return 0;
}
A) What is output 1 above?
a. 18 21 25
b. 21 18 25
c. 25 21 18
d. 25 18 21
B) What is output 2 above?
a. 18
b. 21
c. 25
d. 50
Explanation / Answer
) What is output 1 above? a. 18 21 25 b. 21 18 25 c. 25 21 18 d. 25 18 21 B) What is output 2 above? a. 18 b. 21 c. 25 d. 50
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.