Question Detail
Question
Consider the code inside this bracket: (For i = 0 to 7 step 2 Print "blast off" Next i). How many times will the code section above execute the print statement?
Correct Answer
Option C is the correct answer.
Detailed Explanation
The loop runs from i=0 to 7 with step 2. Values: i=0, 2, 4, 6. That's 4 iterations. When i reaches 8, it stops because 8 is not <= 7.
Hint
Count the number of values: 0, 2, 4, 6.