#include #include #define MAX 10 int A[MAX]; binary_search(int n, int key) { int low=0, high=n-1; int middle; while(low <= high) { /* find middle such that A[middle] = key. */ /* return middle. */ } return -1; } main() { int mid; int n, key; /* Read 'n' Elements in to the array 'A'. */ /* Read the key to be searched. */ /* mid = binary_search(n, key); */ /* print mid if mid is not -1 else print search failed. */ }