Return target node address

I am trying to linear serach for the address of the node but not able to make the recursive logic here i am stuck right now

Hey, i have added the mistake in comment please check it.

@Mohitpandey29
I am getting https://ide.codingblocks.com/s/262588 error of type coversion Can i know why?

@Mohitpandey29 Do you think like my code is logical wrong like
if we have the tree
like
1
| |
2 3
if the key is 3 then
after the left call it will get NULL and after that right call even node is found it get NULL ?

No,your code will handle that since you are calling right once you cannot find the node in left subtree.
Can you tell me how you are giving input to the tree?
Genrally people give it in level order fashion but your code won’t work for level order input.
For that you will need a queue.

@Mohitpandey29 i am giving the input in buildTree fashiion like if -1 put the NULL root->left = buildtree and root->right = buildtree like that