Reverse a stack using another stack

Code is not showing desired output

hello @shubhangis248

it is because
image

after this while loop , ur stack will be empty right?
and there is nothing to reverse in empty stack