Reverse string in place in C