Cognizant interview question

write a code to reversse a string