please tell me where i am doing mistake, as i am not getting any output
Getting no output
First mistake is that here in this question you do not have to compare data.
You just have to compare the shape or the structure.
Also you were not handling the base case correctly. You did have a case when both the root reaches NULL, because of which there was a segmentation fault
Check now
you use graphs data structures which we were not taught till yet. Can you correct my code i am continuously getting error
oh sorry, i share some other link
Check this