I wrote a function for implementing merge sort on singly linked list, where every element has an integer and a next pointer. One of the function splitlist is used to split the given linked list into two linked lists
I'm currently implementing few abstractions to represent level-set operations for 3D objects. Basically what is described in this amazing page for GLSL shaders.
I am currently reading Expert C Programmign - Deep C Secrets. On page 164 where the author was explaining Bus Error and Segmentation fault , he showed this line of code
If a compiled program (let's say C or C++, but I guess this question could extend to any non-VM-ish language with a call stack) - very often when you overflow your stack, you get a segmentation fault:
I have the following program that causes a segmentation fault.I've figured out that it is this line that is causing the problem