Stack
Stack
h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#define maxs 5
int top=-1;
int s_arr[maxs];
void push()
{
int item;
if(top==maxs-1)
cout<<"\n Stack overflow";
else
{
cout<<"\n Enter the item to be pushed into the stack";
cin>>item;
top=top+1;
s_arr[top]=item;
}
}
void pop()
{
if (top==-1)
cout<<"\n Stack underflow";
else
{
cout<<"\n Popped item is : "<<s_arr[top];
top = top-1;
}
}
void display()
{
int i;
if(top==-1)