You output the result at the end of 2 loops. So you got to see the value for both i and k for the last loop. In this case, i will be 1 and 3, k will be 1 and 3. So the last values for i and k are 3 and 3 respectively.
go through it in your head (if you UNDERSTAND IT) and you will know... try to understand this stuff, don't be a brain-dead idiot like the ones I see all the time... "herp derp... I DUNNO, who cares??"
It's a higher education because it's usefull to know all of the material you're being taught at that higher level.
Don't brush by all of it, not remembering it later. I have to assume you have learned this in class since you're taking an exam on it.