11
What will be the output of the program?
#include <iostream>
using namespace std;
template <typename T>
struct Stack {
T d[10]; int top = 0;
void push(T v) { d[top++] = v; }
T pop() { return d[--top]; }
};
int main() {
Stack<int> s;
s.push(4); s.push(9);
cout << s.pop() << s.pop() << endl;
return 0;
}Medium