During a recent interview one of my friends was asked a question to reverse a string using only a single line of code.
The string is already stored in a char* variable.
I tried using recursion, but it never reduced to a single line of code.
Could anyone help me with this?
1 Answer