Capgemini interview question

Write a program to print string reverse without using function.