Question Detail

COM 101 COM 101 Past Questions Objective Question

Question

43. In the VB code snippet below, what does the statement STEP -5 means For counter = 0 to 100 STEP -5
Options
A Increase the value of the counter by 5 during each loop
B After each loop reduce the value of the counter by 5
Correct Answer
C Before each loop reduce the value of the counter by 5
D Before each loop increase the value of the counter by 5
Correct Answer

Option B is the correct answer.

Detailed Explanation

STEP -5 decrements the counter by 5 after each iteration, making the loop count downward.

Hint

Negative STEP means decrease.

Question Info