#include #include #define MAX 10 int stackdata[MAX]; int top=-1; int Push(int what) { if (top-1) { r=stackdata[top]; stackdata[top]=0; top--; return r; } return -1; } void main() { Push(7); Push(12); Push(23); Push(2); Push(33); Push(10); printf("Pop=%d\n",Pop()); printf("Pop=%d\n",Pop()); printf("Pop=%d\n",Pop()); printf("Pop=%d\n",Pop()); printf("Pop=%d\n",Pop()); }