
Dibyendu D. answered 05/20/19
5+ years of experience in programming and teaching C++
You can reverse a string in-place by swapping its first character with the last one, second character with the second last one and so on.
We can write a recursive function for that.
|-----rev----|
rev( A B C D E F G H ) ⇒ swap(A, H) + rev( B C D E F G ) ⇒ H + rev( B C D E F G ) + A
|____swap____|
We can call this recursive function as follows