Stack in C


Prev Tutorial Next Tutorial

Stack in C

Stack is linear data structure. In stack addition of new data item and deletion of already existing data item is done from only one end, known as top. Working of stack on the basis of Last-in-First-out (LIFO) principal, it means last entered item remove first.

stack

Real life example of stack

A most popular example of stack is plates in marriage party. Fresh plates are pushed onto to the top and popped from the top.

stack real life example

Stack Operation

In stack data structure mainly perform two operation; push and pop

  • pop: In case of stack deletion of any item from stack is called pop.
  • push: In case of stack Insertion of any item in stack is called push.

Prev Tutorial Next Tutorial

Advertisements




Facebook Likes

Advertisements