Quote:
string arr[5]={"Audi"};
You declared (and defined) an array of
string
s. See the array content running the following code:
for (int n=0; n<5; ++n)
{
cout << "arr[" << n << "] =\"" << arr[n] << "\"" << endl;
}
Then your code works on array items instead of reversing, as requested, the string of item
0
.