Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 1: Primitive Types
Start Practice TestPractice Test
About Exam
easy Solved by 7 students

While Loop Iteration Count

Mark
< Prev
Next >

Consider the following code segment. How many times will the body of the while loop be executed?

int x = -3;
while (x < 0) {
    x++;
}
A

4

B

2

C

5

D

3

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1patrickmeijer00911 0m 15s 85
#2Potter1611 0m 23s 77
#3busemagngr11 0m 38s 62
#4raufyildirim9511 0m 46s 54
#56test6ing602 0m 00s -20
#6richa.tuli11 2m 19s -39
#7lsj0803092211 12m 45s -665
Items per page:
10
1 – 7 of 7

AI Tutor

How can I help?

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