void kthlargestele(struct node*a,int h,int *c){
if(a==NULL||*c>=h){
return ;
}
kthlargestele(a->right,h,&c);
*c++;
if(*c==h){
printf("kth largest element is %d",a->item);
}
kthlargestele(a->left,h,&c);
}
void kthlargest(struct node*root,int k){
int c=0;
kthlargestele(root,k,&c);
}
The above functions are supposed to print the kth largest element in binary search tree. the inorder of the tree is --17--18--19--20--30--27--35 .However the functions above are not printing anything and I cant figure out why.