1

The intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed.

Correct Answer: Do While intSub < 4 intTotal = intTotal + intNums(intSub) intSub = intSub + 1 Loop dblAvg = intTotal / intSub

Make the most of this question

This page focuses on one Visual Basics MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

Visual Basics MCQs MCQ: The intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed. | Extra Education