Structures and unions are user-defined data types in C that allow developers to group variables of different data types into a single unit.

struct Person 
    int age;
    char* name;
;
struct Person person;
person.age = 30;
person.name = "John";

In the example above, struct Person is a user-defined data type that consists of an age field and a name field.

Unions are similar to structures, but all fields in a union share the same memory space.

union Data 
    int i;
    float f;
;
union Data data;
data.i = 10;
printf("%d\n", data.i); // prints 10
data.f = 3.14;
printf("%d\n", data.i); // prints 0 (garbage value)

In the example above, union Data is a user-defined data type that consists of an i field and an f field. The i field is overwritten by the f field when data.f is assigned a value.

The material classified under this title generally covers specific pillars of advanced C programming. A solid report on these resources highlights the following technical modules:

This guide covers the "dangerous" parts of C that make it powerful. Topics include:

A compiled PDF version of the full tutorial text is available in the /docs directory for offline reading.

A legendary paper (often distributed as a PDF). It dives into CPU caches, TLB, and NUMA. The examples are low-level but essential for performance engineers. You'll find GitHub repositories implementing the cache-testing examples.

If you have only one month to go from intermediate to advanced C, follow this map:

| Week | PDF Focus | GitHub Activity | |------|-----------|------------------| | 1 | Modern C Chapters 9-10 (Memory & Alignment) | Clone jordansissel/advanced-c-programming. Modify the arena allocator. | | 2 | APUE Chapters 4-6 (Files & Directories) | Study stevens-labs/apue.3e/fileio/. Implement ls -R using recursion. | | 3 | Drepper’s Memory Paper (Sections 3-5) | Reproduce the cache-line benchmark from cache-thrash examples on GitHub. | | 4 | Expert C Chapter 8 (Run-time data structures) | Build a generic vector with function pointers for free() and clone(). |

Sean Barrett’s stb headers (e.g., stb_ds.h for hash tables, stb_sprintf.h for fast formatting) are advanced C by example. Reading stb_ds.h teaches: