int a[10],n,key, i, low, high, res:


int binsearch (int a[10], int key, int low, int high);


printf("\n\n enter the number of element to be stored in the array\n\n"); scanf("%d", &n);


printf("\n\n enter the array element\n\n");


scanf("%d",&n);


printf("\n\n enter the array element\n\n");


for(i=0;i<n;i++)


scanf("%d",&n);


printf("\n\n enter the element to be searched\n\n");


scanf("%d", &key);


res-binsearch (a, key, low, high);


if (res==-1)


printf("\n\n element &d is not found \n\n", key, res+1);


getch ();


int binsearch (int a[10], int key, int low, int high)

Comments

Popular posts from this blog

Start system call

Implementation