Using C++; Binary search. Write a function that given an sorted array ofintegers A (ascending order) and an integer value x, searches forthe x in A using binary search. The function returns the indexwhere the value of x is found, and -1 if it is not found.Furthermore, the function should return the number of comparisonsit performs. int binSearch(int x, int A, int size, int &numComp); Attached
Our writing company offers a unique service that provides guidance in different types of assignments. Please rest assured that the service is absolutely legal and doesn’t violate any regulations. It can be used for generating new ideas and thoughts for your own project, additional insight into the subject, or encouragement for further researches.