Infosys interview question

Reverse a string without reversing the special character