I know this code for binary search

Code:

int search(int a[], int key, int low, int high) {
if (high < low) {
return NOT_FOUND;
}
int mid = (low + high) / 2;
if (key>a[mid]) {
return searchName(a, key,low, mid-1);
} else if (key<a[mid]) {
return searchName(a, key,mid+1, high);
} else {
return EXIT_SUCCESS;
}
return ERROR_SEARCH;
}

Now I want to make recursive one which just need

int search(char *dict, char *name,int length,int compChars)

and length is number element in array.

please help me.