Opening the reading…
Opening the reading…
PROGRAMMING FUNDAMENTALS › C++ FUNDAMENTALS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Store "code" in both std::string word and char letters[5]. Change index 1 in each representation to 'O', print both values, then restore "code" using whole-value assignment for word and indexed assignments, including '\0', for letters, and print both restored values.
OUTPUT
SamplecOde cOde code code
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.