subject

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 text box named txtMax? Assume that values have already been inserted into the array.

a. For intIndex = 0 To intNUM – 1

If (intValues(intIndex) > CInt(txtMax. Text)) Then

txtMax. 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

txtMax. text = intMax. ToString

c. For intIndex = 0 To intNUM

If intValues(intIndex) > intMax Then

intValues(intIndex) = intMax

End If

Next

txtMax. Text = intMax. ToString

d. intMax = intValues(0)

For intIndex = 1 To intValues. length

If intValues(intIndex) > intMax) Then

intMax = intValues(intIndex)

maxText. Text = intMax. ToString

End If

Next

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:00
If a client wants to make minor edits, what should he/she use?
Answers: 3
question
Computers and Technology, 22.06.2019 16:20
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
You know the right answer?
Assume that an integer array named intValues contains intNUM elements. Which of the following code s...
Questions
question
Mathematics, 09.04.2021 02:50
question
English, 09.04.2021 02:50
question
English, 09.04.2021 02:50
question
Mathematics, 09.04.2021 02:50
Questions on the website: 13722362