© Giulio Zambon 2016

Giulio Zambon, Practical C, 10.1007/978-1-4842-1769-6_4

4. Lists, Stacks, and Queues

Giulio Zambon

(1)Harrison, Aust Capital Terr, Australia

We are all familiar with lists: in very generic terms, a list is an ordered collection of items, and in the context of programming languages, the items are simple or structured data types. Individual lists can contain items of mixed types, but in this chapter you will only see homogeneous lists, in which all items are values of a single data type.

Although C is not an object-oriented language, it makes sense to begin dealing with lists by looking at which operations you need to be able to perform on them in order to accomplish any meaningful task:

  • Create an empty list (in CS’s terminology, ...

Get Practical C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.