Netcracker Technology interview question

Write code for a palindrome and reverse a string