Advance Stack Using C language

Stack using C language with advance options.#include #include#define MAX 9void push(int stack[],int *top,int item){if(*top==MAX){printf(“nOver Flow…..”);return;}else{*top=*top+1;stack[*top]=item;}}int pop(int stack[],int *top){int a;if(*top==-1){printf(“nUnder flow……”);return -1;}else{a=stack[*top];*top=*top-1;return a;}}void display(int stack[],int top){int i;for(i=0;

Add a Comment

Your email address will not be published. Required fields are marked *

error: Content is protected !!