How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string?
You use std::reverse algorithm from the C++ Standard Library.