Linked Lists
A (linked) list of names of elephants can be represented with the structure:
struct elephant {
char name[10];
struct elephant *next;
};
start = &e1;
e1.next = &e2;
e2.next = &e3;
e3.next = NULL;
start
"Edna"
"Elmer"
"Eloise"
e1
e2
e3
name next name next name next
Previous slide
Next slide
Back to first slide
View graphic version