C program to binary search

C program to binary search

Output:

Enter the size of the array:
5
Enter the elements of array in sorted order:
1 2 3 4 5
Enter the element to search:
5
Element found

Implementation: