Deleting from a linked list in C
Copy your 5.c to a new 6.c.
In main() there is a repeated sequence of calls to printf(), delete(), and
printall() which is commented out. Remove the comment characters so as to
enable this code.
Your task in this part is to
write delete(), which takes just one argument which is the key, and finds and
deletes that item of the linked list.
If the item is not found, delete() does nothing.
Did you remember to free() the struct item you're unlinking from the list?
Also, were you careful not to access any components in that struct item after
you free() it? So you end up having to make an extra copy of one pointer
value before calling free(), or do something else along these lines.
Submit your final file by midnight at the end of Friday with
submit -c csc209h -a lab08 6.c
and don't forget either to run "/u/csc209h/summer/present",
during the tutorial time, on the console of a tutorial lab workstation,
or to get the TA to mark you as present.
[Summary of grading scheme for lab 08]