Hi Val, I've passed your mock exam with 67.8% (>2 hours ). It is an excellent mock exam! Anyway, I have some doubt over the explanation on q28. The current value of j (2) is printed unchanged since the loops have not been able to evaluate their update statements... Actually, the j update statements are indeed evaluated, because if u modified the code to
it will print 3, which means that the j++ is evaluated. Correct me if I am wrong.
The update statement is the third part of the for statement: for (ForInit;Expression;ForUpdate) and in this code the ForUpdate is never executed because both loop break before the update for the inner loop occurs.
Ok thanks Eric, I'll change that within one or two hours... Done... Actually I have taken a more pragmatic approach to explain what is going on... [ March 22, 2002: Message edited by: Valentin Crettaz ]