Question: I need help figuring out the bug to this function and then debug it. here is a screen shot of the code with the result.
I need help figuring out the bug to this function and then debug it. here is a screen shot of the code with the result. I believe there is a "segmentation fault ".

this is what the desired output is supposed to be

so my main questions are
1) what's causing the segmentation default? 2) what is the bug and the solution to the function?
thank you
3 typedef struct node t int val; struct node next; 6 node; 8FIXNE: this function ts buggy, / 9 int equal(cons node b) ( st node a, const if (a-val I 6.val) 12 13 14 15 return 0 a anext b bnext 16 7 tsts are equal if a and b are both null 17 return b 18 19 20/ The matn function extsts just to test 11 equat 21 There are two tests. The second one is by defautt 22 buggy. Please find the error and fix tti/ 23- int nathint arge, char** argv) ( 24 int ti 25 node nodes[10] 26 27 for (L 0; t
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
