Intersection point in y shaped linked list

https://ide.codingblocks.com/s/47605

why this not even printing the linked list.
why the y_intersection function is not working well.

i/p- L1=3->6->9->15->30
L2=10->15->30

i want 15 as intersection pont data.

Your are not initialising head1 and head2 correctly . Instead of this , you should make one separate insert function .
I have corrected ur code . Check here -->
https://ide.codingblocks.com/s/47842