question 1
The method runs on ssmmo. How many characters has it written just after it reads the first o?
the answer, and why
the answer is D
Reading the first m ended ss, so 2s. Reading the first o ended mm, so 2m. 2s2m is 4 characters; o is written only at the end.
if you chose another
- That is 2s alone. Reading the first o also writes mm's run, 2m.
- That is the whole code, 2s2m1o. The last run is written only at the end.
- That counts the runs met so far, ss, mm and o. Only runs that have ended are written.