stack for C implemented using array