Program to Search for an Element in an Array using Binary Search
Description For binary search, array must be sorted. First compare element with the middle element. If element matches with middle element, return mid index. If element is greater than the…