void push(struct stack* stack, char item)
{
    if(isFULL(stack))
        return;
    stack->array[++stack->top] = item;
    return;
}
Beispiel #2
0
 void push(int m)
 {
    if (isFULL()) {
        fputs("Error: stack overflow\n", stderr);
        abort();
    }
    else {
        st.top = st.top + 1;
        st.items[st.top].m = m;
    }
}
Beispiel #3
0
/* Function to add an item to stack. It increases top by 1. */
void push( struct Stack* stack, int item ){
	if ( isFULL ( stack ))
		return ;
	stack->array[++(stack->top)] = item;
	printf("%d pushed to stack\n", item);
}