#include<stdio.h>
#define SIZE 10
int main()
{
int i,arr[SIZE],key;
int l=0,h=SIZE-1,m;
printf(“Enter the numbers in array\n”);
for(i=0;i<SIZE;i++)
{
scanf(“%d”,&arr[i]);
}
printf(“Enter the key”);
scanf(“%d”,&key);
while(l<=h)
{
m=(l+h)/2;
if(key==arr[m])
{
printf(“Element %d is found at %d position”,key,m);
break;
}
else if(key<arr[m])
{
h=m-1;
}
else if(key>arr[m])
{
l=m+1;
}
if(l>h)
{
printf(“not found”);
break;
}
}
return 0;
10,3-17 Top
}