Question: If the amount variable contains the string $56.55, which of the following statements will remove the dollar sign from the variables contents? a. amount.erase($); b.
If the amount variable contains the string “$56.55”, which of the following statements will remove the dollar sign from the variable’s contents?
a. amount.erase("$");
b. amount.erase(0, 1);
c. amount = amount.substr(1);
d. Both b and c
Step by Step Solution
3.39 Rating (168 Votes )
There are 3 Steps involved in it
d ... View full answer
Get step-by-step solutions from verified subject matter experts
