Logicx interview question

Wap a code to reverse a string