Notes
This function is in beta test. Please help improve it in the issues
here.
/in/ex7.c:157:15: runtime error: member access within null pointer of type 'node_t' (aka 'struct node') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/ex7.c:157:15 in AddressSanitizer:DEADLYSIGNAL ================================================================= ==60045==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x000000516309 bp 0x7fffe73073f0 sp 0x7fffe73073c0 T0) ==60045==The signal is caused by a READ memory access. ==60045==Hint: address points to the zero page. #0 0x516308 (/out/package/ex7+0x516308) #1 0x515175 (/out/package/ex7+0x515175) #2 0x7f9395ceeb96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #3 0x41ca29 (/out/package/ex7+0x41ca29) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/out/package/ex7+0x516308) ==60045==ABORTING
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
JOJ Answer
***Print Linked List*** 1 ****Print Finished**** 0 ***Print Linked List*** E 1 ****Print Finished**** 1 0 2 ***Print Linked List*** E 1 h ****Print Finished**** 3 3 4 ***Print Linked List*** E 1 ****Print Finished**** 5 ***Print Linked List*** 1 ****Print Finished**** 6 ***Print Linked List*** ****Print Finished**** 7 ***Print Linked List*** Y ****Print Finished**** 8 ***Print Linked List*** T Y ****Print Finished**** 9 ***Print Linked List*** Y ****Print Finished**** 10 0 11 ***Print Linked List*** ****Print Finished**** 12 ***Print Linked List*** + ****Print Finished**** 13 ***Print Linked List*** ****Print Finished**** 14 0 15 ***Print Linked List*** o ****Print Finished**** 16 ***Print Linked List*** z o ****Print Finished**** 17 ***Print Linked List*** o ****Print Finished**** 18 ***Print Linked List*** o k ****Print Finished**** 19 ***Print Linked List*** V o k ****Print Finished***