They are asking as to find the output but is it depends on what the user entered, so it can be any words. I'm confused, please help me. (is the word the user entered is "word" as well)
int main()
{
string word;
cout << "please enter a word: ";
cin >> word;
int length = word.length();
int i = -1;
do
{
i++;
char ch = word[i];
word[i] = word[length-1];
word[length-1] = ch;
} while (i < --length - 1);