DXC Technology interview question

Reverse of a string program