1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifndef _STACK_H struct stack_record; typedef struct stack_record *stack; typedef int elem; int is_empty(stack s); int is_full(stack s); stack create_stack(int max_elements); void dispose_stack(stack s); void push(elem x, stack s); elem top(stack s); void pop(stack s); elem top_and_pop(stack s); #endif