Stack Related Problem In C