Choosing how to earn college credit? CLEP vs AP guide
| preferred AP College board partner for AP classes
medium Solved by 8 students

While Loop With Post Increment

Mark
< Prev
Next >

How many times will the loop body in the following code segment be executed?

int i = 0;
while(i++ < 4) {
   // Loop Body
}
A

3

B

5

C

4

D

2

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
#1Potter1611 0m 11s 89
#2lsj0803092211 0m 24s 76
#3keithy.mcbeefy11 0m 35s 65
#4jaimonjosh11 0m 46s 54
#5demosolasis111 1m 11s 29
#6patrickmeijer00914 1m 03s 7
#7701704601 - -10
#8barkern19501 0m 30s -40
#9adedokuntaiye00601 0m 50s -60
#10thamminenigamya01 3m 45s -235
Items per page:
10
1 – 10 of 10
No comments yet. Be the first to comment!

AI Tutor

How can I help?

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