Ok, thanks for the help I got the program working. I know the code is probably poor and a jumbled mess but atleast it works. As for looking for "QUERY_OVER" I forgot to post that in my first post. That input file looks like:

Code:
heart yield patient QUERY_OVER
I made these changes to the findhits() function:

Code:
/* Return the amount of hits */
int findhits(struct tree_node *p, int i){
	struct tree_node *pCur = p;	
	
	if(pCur != NULL){
		if(strcmp(pCur -> data, search[i]) == 0)
			return(pCur -> count);	
		
		else if(strcmp(pCur -> data, search[i]) < 0)
			findhits(pCur -> left, i);
		
		else if(strcmp(pCur -> data, search[i]) > 0)
			findhits(pCur -> right, i);
	}
}
I also had to make some adjustments to finescore() and printresults(). I had a few crashes there but I was able to fix those easily. I can't believe I forgot to check for NULL, I had been coding for hours and started making lots of mistakes.

Now that I've turned this in. Can anyone suggest a cleaner more effective way to code this using the binary search trees inside a linear link list? I can't help but to feel somehow that my code is ineffective. The tree wasn't suposed to be AVL for simplicities sake.