Question: When used with an array named MyArray, what is the preerred way to set beginning and ending values of a loop control variable?
- For i = 0 To UBound(MyArray,1)
- For i = 1 To UBound(MyArray,1)
- For i = LBound(MyArray,1) To UBound(MyArray,1)
- It depends on whether Option Base 0 or Option Base 1 is in use.
Answer: The correct answer of the above question is Option C:For i = LBound(MyArray,1) To UBound(MyArray,1)