// Program file: strmanip.cpp // Demonstrates character manipulations with in strings #include using namespace std; void getData(char w[]); void printBackwards(char w[]); int main() { char word[11]; char done = 'N'; getData(word); while (done == 'n' || done == 'N') { printBackwards(word); cout << "Done entering words (Y/N): "; cin >> done; if (done == 'n' || done == 'N') getData(word); } system("pause"); return 0; } void getData(char w[]) { cout << "Enter a word: "; cin >> w; } void printBackwards(char w[]) { for (int i = strlen(w)-1; i >= 0; --i) cout << w[i]; cout << endl; }