Binary Search using C

This example shows how Binary Search Algorithm works. Binary search algorithm is better when an array is sorted because it makes comparison between the search key “k” and middle element of the array. Since the array is sorted, the comparison results either…