Coforge interview question

They asked me to write code to reverse my name