Why is it giving segmentation fault

hi @Jitinkansal i have made changes to your code here https://ide.codingblocks.com/s/298095
please let me know if you dont understand any of the changes.

I have written the code for inserting the node at the end of linked list in which I was not initializing my head node to NULL due to which it was giving segmentation error.

But I don’t know why you gave me the solution for printing minimum sum of the sub array…

hi @Jitinkansal i shared the wrong code by mistake, updated the link now please see.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.