Checkpoint 7.12.1.
What is printed by the following statements?
string fav_food = "ice cream";
fav_food[3] = "d";
cout << fav_food << endl;
- icd cream
- Remember that indexing begins at 0, not 1.
- icedcream
- Index 3 was a space and now it is "d".
- ice cream
- The character at index 3 should be changed to "d".
- iced
- The character at index 3 should be changed to "d", and the rest stays the same.