Suppose the following code is written to reverse the characters in a string, explain why it is wrong.
string s = "ABCD" ;for (int i =0 , j = s.size() − 1 ; i
char temp = s[i]; s[i] = s[j]; s[j] = temp;}cout << "The reversed string is " << s << endl;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.