Write a program that will use a recursive binary search to


Please write in C++.

Write a program that will use a recursive binary search to locate an integer in a sorted array. The integer values will be provided in a file named dataarray.bin. You should dynamically allocate memory sufficient to hold all elements in this array and read the contents of this file into your data structure.

Your code must implement a function called recursiveBinarySearch(int start_index, int end_index, int_targetValue) which will perform the binary search for the integer value entered at the command line.

If the value is found you should print a string "N:V" where N is the number of comparisons made before the value V is found. If the value V is not found in the array print a dash, for example "23:-"

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a program that will use a recursive binary search to
Reference No:- TGS02894653

Expected delivery within 24 Hours