ITC Infotech interview question

Reverse a string with using for loop