Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 4: Iteration
Start Practice TestPractice Test
About Exam
medium Solved by 2 students

For Loop Iteration Count

< Prev
Next >

How many times will the body of the for loop execute in the following code segment?

int count = 0;
for (int i = 0; i < 10;) {
    count++;
    i += 2;
}
System.out.println(count);
A

6

B

10

C

4

D

5

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

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|