Function to Perform POP operation


initially, top= -1
void pop()
{
 int item;
 if(top==-1)
 printf("\n Stack is empty \n");
 else
 {
 item=stack[top];
 top=top-1;
 printf("\n the poped item is %d \n",item);
 }
}

0 comments:

Post a Comment