Question: 21 Write the code outputs the following ? Stack S; S.push(100); S.push (200); S.push (300); S.push (400); S.push (500); int j= S.pop(); int i= S.pop();
21 Write the code outputs the following ? Stack S; S.push(100); S.push (200); S.push (300); S.push (400); S.push (500); int j= S.pop(); int i= S.pop(); S.push(i); S.push (S.pop()); while (!S.empty_stack()) { i=S.pop(); cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
