inbuilt function to reverse an chararray in c++ code example Example: how to reverse a character array in c++ std::reverse(str, str + strlen(str));