the answer that I get is 11 but I not sure about it, so I would like to know is
ID: 3803328 • Letter: T
Question
the answer that I get is 11 but I not sure about it, so I would like to know is my answer is correct
mov n, 1
mov t, 2
while: cmp n, 7
jge end
mov eax, t
add eax, n
mov t, eax
mov eax, n
add eax, 2
mov n, eax
jmp while
mov eax, t
add eax, 1
mov t, eax
end:
Assume the above partial program was run. When completed the final value of t is (decimal)
Explanation / Answer
Yes. Your answer is correct. It should be 11 only as when n becomes 7 then it will execute conditional jump to end line. So, below 3 lines will never execute.
mov eax, t
add eax, 1
mov t, eax
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.