ThinkPalm Technologies interview question

Write code to replace letter in a word with another letter.