Question #235853

Execute this code with THREE pushes and ONE pop
stack<int> s;
s.push(1);
s.push(2);
s.push(3);
cout << s.pop( );
Suppose that s is represented by a linked list. Draw the state of the private member
variables of s after the above code:
_______
head_ptr| |
|_______|

Expert's answer

manyelement is 2.  The resultant list is head->2->1


 head_ptr |       |  
          |_______|

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS