For Loop Execution Trace
Consider the following code segment:
for (int i = 1; i < 100; i = i * 2)
{
if (i / 50 == 0)
System.out.print(i + " ");
}
What is printed as a result of executing the code segment?
A
2 4 8 16 32
B
2 4 8 16 32 64
C
1 2 4 8 16 32
D
1 2 4 8 16 32 64
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | sgarv2513 | 1 | 1 | 0m 00s | 100 |
| #2 | hitrishabhatia | 1 | 1 | 0m 00s | 100 |
| #3 | y.seong2027 | 1 | 2 | 0m 49s | 41 |
APFIVE