Reverse Stack using another stack code

Here is the code :-https://ide.codingblocks.com/s/466062, please specify what is the error in the code?

hello @Sakshi2004

In input box u have given only 4 input but n is 5.

correct it and it should work