Questions about Linked Lists?

segmentation fault on mirror exercise .

segmentation fault on mirror exercise .

by Alirida Younes -
Number of replies: 1
Picture of GroupEn

The code is working fine on gdb compiler, but giving segmentation fault on lab code runner.

Attachment 2021-02-22 (29).png
Attachment 2021-02-22 (30).png
In reply to Alirida Younes

Re: segmentation fault on mirror exercise .

by Siba Haidar -
Res should be initialised to Null

The base case should not return Null but headRef. (*headRef = Null but not headRef itself)