Playing cards using stack

why? i have allocated the stacks

Crosscheck your code with this. In your code there is some issue with indexing. Dry run with the sample case and check.