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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, westjayson69
Requirement types discussed during software development include functional and color scheme nonfunctional and code style constraint and nonfunctional fashionable and functional.
Answers: 2
image
Computers and Technology, 22.06.2019 14:10, normarismendoza
Dean wants a quick way to look up staff members by their staff id. in cell q3, nest the existing vlookup function in an iferror function. if the vlookup function returns an error result, the text “invalid staff id” should be displayed by the formula. (hint: you can test that this formula is working by changing the value in cell q2 to 0, but remember to set the value of cell q2 back to 1036 when the testing is complete.)
Answers: 3
image
Computers and Technology, 22.06.2019 14:50, williamsgregg5214
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer. b. don’t write your password down and leave it where others can find it. c. share your password with your friends. d.each time you visit a website, retain the cookies on your computer. e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
image
Computers and Technology, 22.06.2019 17:00, ruddymorales1123
What allows you to create a wireless connection among your smart devices
Answers: 2
You know the right answer?
Assume that an integer array named intValues contains intNUM elements. Which of the following code s...

Questions in other subjects:

Konu
Social Studies, 29.03.2021 02:00
Konu
Mathematics, 29.03.2021 02:00
Konu
Mathematics, 29.03.2021 02:00