// Using the STL generic reverse algorithm with an array. #include #include // for reverse algorithm #include #include int main() { cout << "Using reverse algorithm with an array" << endl; char string1[] = "mark twain"; int N1 = strlen(string1); reverse(&string1[0], &string1[N1]); assert(strcmp(string1, "niawt kram") == 0); }