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 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
question
Computers and Technology, 25.06.2019 03:30
What best describes the purpose of occupational safety and health administration
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
question
Mathematics, 10.06.2021 21:20
question
Mathematics, 10.06.2021 21:20
Questions on the website: 13722363