Capgemini interview question

1 : Write a program for string reverse.