Chapter 3. Advanced C Data Types

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

—Douglas Adams

Pointers, structures, unions, dynamic memory, and type name declarations are the basic building elements for more sophisticated C data types and algorithms. Although we have encountered them a number of times up to now, their uses are sufficiently diverse, specialized, and idiomatic to merit in-depth treatment. In this chapter we examine how pointers, structures, and unions are typically used in programs and provide examples for each usage pattern. By recognizing the function served by a particular language construct, you can better understand the code that ...

Get Code Reading: The Open Source Perspective 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.