Multiple Choice
Which of the following code segments is the correct solution for the following problem? Find the first occurrence of the value "Joe" in the array strNames. Save the index of the element containing "Joe" in a variable named intPosition. Discontinue searching the array once the first occurrence of the element "Joe" has been located. Assume any variables you need are already defined.
A) For intCount = 0 To strNames.length-1 If strNames(intCount) = "Joe" Then
IntPosition = intCount
End If
Next
B) blnFound = True intCount = 0
Do While (Not blnFound) And (intCount < = strNames.Length - 1)
If strNames(intCount) = "Joe" Then
BlnFound = False
Positon = intCount
End If
IntCount += 1
Loop
C) blnFound = False intCount = 0
Do While (Not blnFound) And (intCount < strNames.Length)
If strNames(intCount) = "Joe" Then
BlnFound = True
IntPosition = intCount
End If
IntCount += 1
Loop
D) blnFound = False For intCount = 0 to strNames.Length -1 and Not blnFound
If strNames(intCount) = "Joe" Then
BlnFound = True
IntPosition = intCount
End If
Next
Correct Answer:

Verified
Correct Answer:
Verified
Q1: Values in an array are stored and
Q2: Which of the following statements sorts an
Q4: Which of the following code segments displays
Q5: Which statement is the best solution for
Q6: Which of the following could be used
Q7: Parallel arrays have all of the following
Q8: Which of the following statements defines a
Q9: Which of the following is the correct
Q10: Which of the following declares an array
Q11: Which of the following allows an application