Preprocessor and generic code

This part of the C course covers the preprocessor, which runs before the compiler and rewrites the file: includes, object and function macros, include guards and the macros the compiler defines itself. It also covers the generic code C offers without templates: void pointers, _Generic, variadic functions, and the error handling that reports a failure up the call chain.

8.1 The preprocessor includes, object macros, include guards, predefined macros Open 8.2 Macros function macros, do-while, stringify, token pasting, pitfalls Open 8.3 Generic code void pointers, element size, _Generic, type-safe wrappers Open 8.4 Variadic functions stdarg, va_list, format helpers, sentinel arguments Open 8.5 Error handling errno, return codes, goto cleanup, setjmp and longjmp Open

Lessons