subject
Computers and Technology, 17.10.2020 06:01 Ideen

Steve wrote the given code having an array numArray where i is given the location of the first occurrence of numKey in the array. If numKey is not present in numArray, i is given value of -1. i=0

while(numArray[i]!=numKey)

i++;

if(numArray[i]!=numKey)

i=-1;

In which of the given options will Steve find that the program has failed?

A.
when numKey is the largest element
B.
when numKey is the smallest element
C.
when numKey is 0
D.
when numKey is not in the array

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:20, kiarakagni
What is a point-in-time measurement of system performance?
Answers: 3
image
Computers and Technology, 23.06.2019 09:00, opgbadwolf5
What provides an array of buttons for quick access to commonly used commands and tools
Answers: 1
image
Computers and Technology, 23.06.2019 20:00, noah12345678
What multimedia system creates an immersive, real-life experience that the user can interact with?
Answers: 1
image
Computers and Technology, 23.06.2019 20:30, kaylee2828
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
You know the right answer?
Steve wrote the given code having an array numArray where i is given the location of the first occur...

Questions in other subjects: