dos_compilers/Mix C v251/EXAMPLES/EXAM73B.C
2024-07-24 09:30:16 -07:00

13 lines
403 B
C

main() /* Example 7.3 - part B */
{
int count; /* test push, pop, & top_reset */
int pop(),push(),stk_lst(),top_reset();
top_reset(); /* start off with fresh stack */
stk_lst(); /* see if stack is empty */
for(count=0; push(count)> -1; count++) ;
stk_lst(); /* list current contents */
while (pop() > -1);
stk_lst(); /* see if stack empty */
}