Actually the output will be as follows.
s = 12 k = 10 i = 0
The variable i does not change anywhere in the code after initialization.
As for the other two variables, it is easy to calculate "on the fingers", to which they will be equal.
So, after initializing k value 2 is
for(k--; k < 10; k++) { k += 2
After k-- k became equal to 1. Further, inside the body of the cycle, it increases by 2
k += 2;
and after leaving the body of the cycle, it increases by 1
for(k--; k < 10; k++) ^^^^
Accordingly, k successively obtains the following values before checking the condition of the loop.
1, 4, 7, 10
The field of which the cycle ends
However, in the body of the loop, the variable k will have the following values
3, 6, 9
Accordingly, the variable s will be equal to the sum of 3 + 9 = 12, since the value of k equal to 6 is skipped
if(k == 6) { continue; ^^^^^^^^ } s += k;
EDIT : Since on the first attempt you did not manage to type the correct source code in your question, and now it is different from what it was originally, the following takes place.
There was only one change: a sentence was added to the loop that changes the value of the variable i
for(k--; k < 10; k++) { k += 2; if(k == 6) { continue; } s += k; i++; ^^^^^ }
Since, as was shown above, the body of the loop will be executed three times for values of k respectively, equal to 3, 6, 9, and with a value of k equal to 6, the execution of the loop body is interrupted due to the contine , this sentence
i++;
will be executed only twice. As a result, the final value of the variable i will be 2.