17. Suppose a computer uses 4-bit one’s complement numbers. Ignoring overflows, what value will be stored in the variable j after the following pseudo code routine terminates?
0 → j // Store 0 in j.
-3 → k // Store -3 in k.
while k ≠ 0
j = j + 1
k = k - 1
end while
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.