Writing a function to reverse a string is a good way to get familiar with the language. In future projects however, you might want to use the reverse function from the standard C++ library:
Code:
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int main (int argc, char **argv)
{
char sentence[100];
cin.getline (sentence, 100);
reverse (sentence, sentence + strlen (sentence));
cout << sentence << endl;
return 0;
}