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 04:00
Which spereadsheet type will determine how well a bussiness has done over the past year
Answers: 1
question
Computers and Technology, 22.06.2019 08:30
Linda subscribes to a cloud service. the service provider hosts the cloud infrastructure and delivers computing resources over the internet.what cloud model is linda using
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
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
Chemistry, 03.12.2019 21:31
Questions on the website: 13722361