<code>for (int i = 0; i < n; i++);</code> is
- A
Loops once
- B
Compile error
- C
Infinite
- Dcheck_circle
An empty loop body (does nothing each iteration)
Explanation
Trailing <code>;</code> ends the loop body. Common in busy-wait or counting tricks.
AP Computer Science A· difficulty 3/5
<code>for (int i = 0; i < n; i++);</code> is
Loops once
Compile error
Infinite
An empty loop body (does nothing each iteration)
Explanation
Trailing <code>;</code> ends the loop body. Common in busy-wait or counting tricks.
Want 10 more like this — adaptive to your weak spots?