#include int stackTop = -1; int stackData[100]; void push(int x) { // check if stack is not full. if ( stackTop < 100 ) { stackData[++stackTop] = x; } } int pop( ) { // check if stack is not empty if ( stackTop > -1 ) { return( stackData[stackTop--] ); } return (-999999); // Pop empty stack error }