Amdocs interview question

write program to reverse a string