| preferred AP College board partner for AP classes
AP Computer Science A/Unit 4: Iteration
Start Practice TestPractice Test
About Exam
medium Solved by 3 students
Java For Loop Iteration Count
< Prev
Next >

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

Cannot be determined from the information given

C

p / 2

D

(p + 1) / 2

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy