1. Lab 08 part 3 intro
2. Traversing
3. Searching
4. Inserting
5. Better insert
6. Deleting
Grading

[All of lab 08]
[All labs]
[Course home page]

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.

[After writing your solution, but before submitting, click here for a note about evaluating your solution]

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]