![]() |
CITS2002 Systems Programming |
← prev | next → | ![]() |
![]() |
|||
Declaring a list of itemsLet's develop a similar data structure that, unlike the first-in-last-out (FILO) approach of the stack, provides first-in-first-out (FIFO) storage - much fairer for queueing at the ATM!We term such a data structure a list, and its datatype declaration is very similar to our stack:
As with the stack, we'll need to support empty lists, and will again employ a NULL pointer to represent it. This time, each data item to be stored in the list is string, and we'll often term such a structure as "a list of strings".
CITS2002 Systems Programming, Lecture 19, p9, 3rd October 2023.
|