Lecture 18 Objectives


At the end of today's class you should

KNOW:

BE ABLE TO:

Sample Exam Question: Suppose head is a pointer to a linked list, and previousPtr is a pointer to some node in the linked list. Example:


    head-->  5--> 2--> 16--> 23-->NULL
                        ^
                        |
                   previousPtr
Write the C statements needed to insert a new node after the node pointed to by previousPtr. The new node should contain the value 42.