Javatpoint Logo
Javatpoint Logo

C++ Deque push_back()

C++ Deque push_back() function adds a new element at the end of the deque container and the size of the container is increased by one.

Syntax

Parameter

val: New value to be inserted at the end of the deque container.

Return value

It does not return any value.

Example 1

Let's see a simple example

Output:

10 20 30 40 50

In this example, push_back() function adds new element i.e 50 at the end of the deque.


Next TopicC++ Deque



Help Others, Please Share

facebook twitter pinterest