Capgemini interview question

Reverse the String correct the error and print the output