Given: What is the result?
A.
ii = 0 ii = 1 ii = 2 ii = 3
B.
ii = 3
C.
ii = 0 ii = 2
D.
Compilation fails.
Explanation:
Given: What is the result?
A.
ii = 0 ii = 1 ii = 2 ii = 3
B.
ii = 3
C.
ii = 0 ii = 2
D.
Compilation fails.
Explanation:
C
Answer: C
Explanation:
The ii variable will be incremented for each execution one time by the for and another time at the end of the loop after the system out. This will cause the value to be incremented by 2 each time the loop executes.