Given the code fragment:

How many times is 2 printed?

How many times is 2 printed?
Correct Answer: B
The outer loop will run three times, one time each for the elements in table. The break statement breaks the inner loop immediately each time. 2 will be printed once only.
Note: If the line int ii = 0; is missing the program would not compile.
Note: If the line int ii = 0; is missing the program would not compile.