Stack implemented in c