A

Admin • 833.24K Points
Coach

Q. How many times will this loop execute?
for (int i = 0; i < 10; i += 3)

  • (A) 3
  • (B) 4
  • (C) 5
  • (D) Infinite
  • Correct Answer - Option(B)
  • Views: 16
  • Filed under category Java
  • Hashtags: Java Loops

Explanation by: Admin

i will take values 0, 3, 6, 9 – loop runs 4 times.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.