Design a Program for the following operations on STACK of Integers (Array Implementation of Stack with maximum size MAX) a. Push an Element on to Stack b. Pop an Element from Stack c. Demonstrate how Stack can be used to check Palindrome d. Demonstrate Overflow and Underflow situations on Stack e. Display the status of Stack f. Exit Support the program with appropriate functions for each of the above operations
CODE in C++ language :- /** * * * @Author :- SMITPATEL */ #include"cstdlib" #include"iostream" #include"stack" using namespace std; const int MAX = 100; int tp = -1; int M[MAX]; void push(int item); int pop(); void palindrome(); void show();//display function void push(int item) { if( tp == MAX - 1) { cout << "**__**__**__Stack Overflow__**__**__**" << endl; return ; } tp = tp + 1; M[tp] = item; } int pop() { int item; if( tp == -1) { cout << "**__**__**__Stack Underflow__**__**__**" << endl; return -1; } item = M[tp]; tp = tp-1; return item; } void show() { int i; if(tp == -1) { cout << "**__**__**__There is no Stack__**__**__**" << endl << endl;//Stack is empty. return; } cout << endl <<"\tStack Element are : "<< endl; for( i=tp; i>=0; i--) { cout << ...