subject

Q4 binary search your program must work on a sorted in non-decreasing order - array of int values and be able to return whether a particular value is present in the array or not. your program must have a static extern array of integers, initialized to values in a non - decreasing order you may choose values of your choice and assign them statically in program i. e. in array-definition initialization itself or calling a function that assigns values (but not taken from user). go for an array with a minimum of 50 values then the program asks the user to input an int value to check if it is present in the array the program must prompt for and accept the input in main. the program must do a binary search and return (in a separate function defined in a separate file) and print (in main) whether the value is found or not. if found it must return at what position/index in the array. this information must be printed (from main as mentioned) and then program exits no need to stay in loop and ask for another or next input etc the static extern array should not be in the file that contains main since main has no reason to know it. it should be in the file that contains the search function you may read binary search algorithm or ask.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
1.the index finger on your right hand types the f r v 4 j u m 7 h y 6 n lo.9 j u 7 m g t 5 b 2.if you need to multiply 400, 2, and 1 ½, what would you type on the numeric keypad? 400*2*1.5 400/2*1.5 400/2/1.5 400*2*1½ 3.select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair. rest your palms on the keyboard. relax your fingers. keep your hands lower than your elbows.
Answers: 1
question
Computers and Technology, 23.06.2019 10:30
Would a ps4 wired controller work on an xbox one
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Which explains extrinsic motivation? a)motivation in which there is a reward b)motivation that is personally satisfying c)motivation that is personally meaningful d)motivation in which the subject is interesting
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
You know the right answer?
Q4 binary search your program must work on a sorted in non-decreasing order - array of int values an...
Questions
Questions on the website: 13722361