program to implement a stack using array