Java For Loop Iteration Count
Consider the following code segment.
for (int k = 0; k < p; k += 2)
if (data[k] <= limit) System.out.println("LOW");
What is the maximum number of times that LOW can be printed as a result of executing this code?
A
p
B
p / 2
C
(p + 1) / 2
D
Cannot be determined from the information given
Question Leaderboard
Not enough data yet to show leaderboard.
