// Using the STL generic reverse algorithm with an array.
#include <iostream>
#include <algorithm> // for reverse algorithm
#include <assert.h>
#include <string.h>
using namespace std;

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);
  return 0;
}
