Solved

Given the Following Code, Assume the MyStack Object Is a Stack

Question 37

Multiple Choice

Given the following code, assume the myStack object is a stack that can hold integers and that value is an int variable. 1 myStack.push(0) ;
2 myStack.push(1) ;
3 myStack.push(2) ;
4 myStack.pop(value) ;
5 cout << value << endl;
Assume that the pop function, called on line 4, stores the number popped from the stack in the value variable. What will the statement on line 5 display?


A) 0
B) 1
C) 2
D) None of these

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions