If the word variable contains the string “Bells”, which of the following statements will change the contents of the variable to “Bell”?
a. word.erase(word.length() - 1, 1);
b. word.replace(word.length() – 1, 1, "");
c. word = word.substr(0, word.length() – 1);
d. all of the above
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.