how to get the address of the target node in Binary Tree
My code is following
node *search_target_node(node *root,int target)
{
if(root==NULL)
{
return NULL;
}
if(root->data==target)
return root;
root= search_target_node(root->left,target);
root= search_target_node(root->right,target);
return root
}