Push

The push function is used to push an element into the Stack.

The element gets pushed onto the top of the Stack.

Syntax :

Push(Stack)
Parameters Description
stack Data type that serves as a collection of elements.

Example :

pen
pencil
paper 
eraser
ipush = push()

Result :

marker
pen
pencil
paper 
eraser