Multiple Choice
Assume that an integer array named intValues contains intNUM elements. Which of the following code segments most efficiently finds the largest element in the array and displays it in a label named lblMaxValue? Assume that values have already been inserted into the array.
A) For intIndex = 0 To intNUM - 1 If (intValues(intIndex) > CInt(txtMax.Text) ) Then
LblMaxValue.Text = intValues(intIndex) .ToString
End If
Next intIndex
B) intMax = intValues(0) For intIndex = 1 to intValues.length - 1
If intValues(intIndex) > intMax Then
IntMax = intValues(intIndex)
End If
Next
LblMaxValue.text = intMax.ToString
C) For intIndex = 0 To intNUM If intValues(intIndex) > intMax Then
IntValues(intIndex) = intMax
End If
Next
LblMaxValue.Text = intMax.ToString
D) intMax = intValues(0) For intIndex = 1 To intValues.length
If intValues(intIndex) > intMax) Then
IntMax = intValues(intIndex)
LblMaxValue.Text = intMax.ToString
End If
Next
Correct Answer:

Verified
Correct Answer:
Verified
Q12: This property of a control allows it
Q13: When changing the number of elements in
Q14: Which type of loop is designed specifically
Q15: Which of the following provides the index
Q16: What value should be placed in a
Q18: The following statements apply to a Timer
Q19: What task is accomplished by the following
Q20: Which of the following code segments sets
Q21: What is the best way to describe
Q22: Due to their similarities, it's easy to