1.

What is the output of this program?
#include <iostream>
#include <stack>
using namespace std;
int main ()
{
stack<int> StackData;
StackData.push(25);
StackData.push(45);
StackData.top() -= 5;
cout << StackData.top() << endl;
return 0;
}

A. 45
B. 25
C. 5
D. Compilation Error
E. None of these
Answer» B. 25


Discussion

No Comment Found

Related MCQs