Infosys interview question

Write palindrome program in c as well as java.