Pop operation in Stack

POP Operation In this  operation topmost element is deleted from the stack.Before deleting check if TOP = NULL.If yes,it means that stack is empty and no deletion can be done.If an attempt to delete element is made in this case the UNDERFLOW message will be printed on screen.If no,then element is deleted then value of… read more »

Push operation in Stack

Push Operation In this operation,the element is inserted at the top of stack(Fig 4). In order to insert element we need to check whether TOP = MAX-1. If  yes,then insertion  is not possible. If  element is still  tried for insertion , OVERFLOW message will be printed on screen as the stack do not have extra… read more »


Stacks are the linear data structure which stores data in an ordered way.The first element inserted is at the bottom and last element is at the top.It can be implemented using an array or a linked list.It is a LIFO(Last In First Out) data structure.This means that last element inserted will be first element to… read more »