Capgemini Interview Question

Reverse the String correct the error and print the output