Please check if it's right, i think i'm getting right output, but not sure...Code:#include<stdio.h> #include<conio.h> int bnsearch(int [],int,int,int,int); void main() { int arr[10],i,element,pos,low,high,size=10; printf("Enter data..\n"); for(i=0;i<10;i++) { scanf("%d",&arr[i]); } printf("Enter Search element..\n"); scanf("%d",&element); low=0; high=10; pos=bnsearch(arr,element,size,low,high); printf("Element found at pos %d\n",pos); getch(); } int bnsearch(int arr[],int element,int size,int low,int high) { int mid,i,b=0; mid=(low+high)/2; printf("mid is : %d\n",mid); for(i=low;i<=mid;i++) { if(arr[i]==element) return i; } low=mid+1; for(i=low;i<=high;i++) { if(arr[i]==element) return i; } printf("low is : %d\n",low); bnsearch(arr,element,size,low,high); }