POP Program in Data Structure

No comments


POP :

#define N 10 // Maximum elements in a stack
int top = -1 // indicates empty stack
int s[N] // initially all the element are (-1)
int POP( )
{
int x;
if (top = = -1)
{
printf ("Stack is Empty");
exit (0);
}
x=s[top];
top = top-1;
return (x);
}

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀