If the amount variable contains the string $56.55, which of the following statements will remove the dollar

Question:

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

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: