Linked Lists Review
So here's a node similar to what you may have seen in lecture. The
data section of the nodes can be as simple as a single int, or as
complex
as an entire struct. The head pointer allows you to access the first node in the
linked list to perform various operations on the list.

Using a Head Structure with a Linked List
A head structure keeps this pointer to the head, plus some more useful information
about the entire list, such as:
- The number of nodes in the list
- A total of some values in the list
- Perhaps the tail of the list (the last node)
Here is what the Head structure in our lab will look like:

The code for declaring such a structure looks like this:
typdef struct headStructure
{
int numNodes; /* number of nodes in the list */
int classSum; /* sum of grades in the entire list */
NODEPTR head; /* will point to the start of the list */
} HEADSTRUCTURE;
In Summary
- Head structures are structures that hold extra information, like
length statistics and the sum of quantities of a list.
- Head structures contain a NODEPTR, which allows access to the first element of
the list (usually called head).
- They really aren't too hard to implement!
Now you are ready to begin the lab. Go to Step 0