Question Detail

COM 101 COM 101 Past Questions Objective Question

Question

84. In the code snippet below, what does the statement STEP-1 means For index = 10 to 0 STEP - 1
Options
A Divide the value of the index by 1
B Nothing as For loops in VB cannot count backward
C Reduce the value of the index by 1
Correct Answer
D It serves as entry point to the for loop
Correct Answer

Option C is the correct answer.

Detailed Explanation

STEP -1 in a VB For loop decrements the loop counter by 1 each iteration, allowing the loop to count backwards.

Hint

STEP controls the increment/decrement in a For loop.

Question Info