# size **Description** : size() function is used to return the size of the satck or the number of elements in the stack. **Example**: ```cpp // Empty stack std::stack mystack; mystack.push(4); mystack.push(5); mystack.push(9); mystack.push(1); mystack.push(3); // Stack from top to bottom becomes 3, 1, 9, 5, 4 // Print the size of mystack (5) std::cout << mystack.size(); ``` **[Run Code](https://rextester.com/OEZV66856)**