LearnFrenzy
Sign in Take a free test

Control Flow Statements · Control Flow MCQ · Question 14

How many times does this for loop run? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 14 Back to Exercise

How many times does for (int i = 2; i <= 20; i += 4) run?

  • A 4
  • B 5 Correct
  • C 6
  • D 18
Correct Answer: Option B

i = 2, 6, 10, 14, 18.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links