Step Into Labs

Step Into C · Lesson 33 · Capstone

Final Project: Linked Lists

Self-referential structs, heap nodes, removal, cleanup, and Windows-style LIST_ENTRY lists.

Part of Step Into C. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

This last lesson combines structs, pointers, the heap, typedefs and careful memory ownership into the data structure you will see everywhere in systems code: the linked list.

In this lesson

Missions

  1. Build and print
  2. Length and search
  3. Remove a node
  4. Clean up after yourself
  5. LIST_ENTRY and CONTAINING_RECORD