Accenture interview question

How to reverse a stack and write working code?