adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    #include <stack>
    using namespace std;
    int main ()
    {
        stack<int> myints;
        cout  << (int) myints.size();
        for (int i = 0; i < 5; i++) myints.push(i);
        cout  << (int) myints.size() << endl;
        return 0;
    }

a.

05

b.

15

c.

24

d.

102

Answer: (a).05

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?