Whats wrong with the code? Whats wrong with the code?

Whats wrong with the code? Whats wrong with the code? Whats wrong with the code? Whats wrong with the code?

Link is in description above.

You are not updating the new character in original string.
I have commented the part, where you are not updating.
Your working code.

Ohh Thanks! Feeling stupid now xD