Coforge Interview Question

They asked me to write code to reverse my name