Basic 'char' Stack implementation in C
You could allow to initialize the stack locally.
Just by separating the bigger part of stack_create to separate function.

void stack_init(STACK* stack, char* mem, size_t size)
{
    stack-&gt;mem = mem;
    stack-&gt;size = size;
    stack-&gt;top = -1;
}

char stack_mem[STACK_SIZE];
STACK stack;
stack_init(&amp;stack, stack_mem, STACK_SIZE);


As for error handling, stack usualy does not handle it. You should instead offer the "is empty?" and "is full?" functions. Consumers of the stack are then responsible for making sure stack is not empty before they peek or pop, and that it is not full before they push. Check for emptiness is often integral part of algorithms using the stack anyway. Check for fullness not so much, it Is mostly limitation of a fixed size stack. But the consumer must check it nevertheless or they must be sure that bigger stack is never needed.

In stack_create you should check if malloc returns null then dont assign to properties and return null as well. Consumers are again responsible for checking this situation.

One last point, the stack_create could be complemented with stack_destroy.