C++ List size()
C++ List size() function finds the number of elements present in the list. This function does not modify the content of a deque.
Syntax
Parameter
It does not contain any parameter.
Return value
It returns the number of elements in the list.
Example
Let's see a simple example
Output:
In this example, size() function returns the size of the list i.e 3.
|