Q. What will be assigned to the dblAvg variable after the code has been executed?
The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed.
Code:
The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed.
Do While intSub < 4
intTotal = intTotal + intNums(intSub)
intSub = intSub + 1
Loop
dblAvg = intTotal / intSub β 1
Dim intNums() As Integer = {10, 5, 7, 2}.
β
Correct Answer: (B)
5