typedef struct STACK
{
 int  *buffer;
 int  pointer;
 int  size;
 char flag_full;
} STACK;

int stack_init(STACK * stack,int size);
void push(STACK *stack,int c);
int pop(STACK *stack);
float middle_stack(STACK *stack);
void delete_stack(STACK *stack);


typedef struct STACK_f
{
 float *buffer;
 int  pointer;
 int  size;
 char flag_full;
} STACK_f;

int stack_init_f(STACK_f * stack,int size);
void push_f(STACK_f *stack,float c);
float pop_f(STACK_f *stack);
float middle_stack_f(STACK_f *stack);
void delete_stack_f(STACK_f *stack);

Hosted by uCoz