C simple stack implementation