You can code your response in both ways and put a counter to see how many moves your counter does to go from a place to another and to change letters.
On the problem : wouldn't it be faster to declare another char[100] and fill it as we go through the first char array ? And then either return it, or change the first char address to the second ?