Accenture interview question

Write a code for string is palindrome or not.