Vidyalelo
C++ Programming · Q868

C++ miscellaneous

Programming · C++ Programming · question 868

Q868

What will be the output of the following C++ code? #include #include using namespace std; int main () stack myints; cout << (int) myints.size(); for (int i = 0; i < 5; i++) myints.push(i); cout << (int) myints.size() << endl; return 0;

A.
05
Answer
B.
15
C.
24
D.
102

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board