Why is this not giving an output?

hey @kamya, in line 85 you have assigned q to NULL and in line number 90 you are making q->data=p->data. You cannot do that until q is NULL.

its still not giving an output.https://ide.codingblocks.com/s/109478

hey @kamya, you shared me wrong code.

https://ide.codingblocks.com/s/109478 Sorry this is the code

hey @kamya, I have made changes to your code and indicated them as comment. You can check them here https://ide.codingblocks.com/s/109524.