Computers and Technology

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, Jessieeeeey
Kto rozmawia z clamentain przez krótkofalówke w the walking dead która śledzi lee w 4 epizodzie
Answers: 1
image
Computers and Technology, 22.06.2019 22:50, cheyennecarrillo14
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
image
Computers and Technology, 23.06.2019 00:00, destinysmithds7790
Suppose you have 9 coins and one of them is heavier than others. other 8 coins weight equally. you are also given a balance. develop and algorithm to determine the heavy coin using only two measurements with the of the balance. clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, kreshnikolloma
You wanted to look up information about alzheimer's, but you were unsure if it was spelled "alsheimer's" or "alzheimer's." which advanced search strategy would be useful? a) a boolean search b) using a wild card in your search c) trying different search engines d) doing a search for "alsheimer's not alzheimer's" asap. ill give brainlist.
Answers: 1
Do you know the correct answer?
Q4 binary search your program must work on a sorted in non-decreasing order - array of int values an...

Questions in other subjects:

Konu
Physics, 19.11.2020 20:40
Konu
Health, 19.11.2020 20:40