C Language — Practical Advanced Programming (C2)

Programming, C, C++

While application development has shifted toward higher abstractions, C remains the language of operating systems, network stacks and embedded devices, and is often used to implement higher-level languages and database engines in production.

The course covers C's role in microcontrollers and real-time hardware, shows how C integrates with other languages, and explains the C23 standard. It focuses on embedded and Unix environments and can be tailored to your team's needs.

Location, current course term

Contact us

Custom Customized Training (date, location, content, duration)

The course:

Hide detail
  • Capabilities of the C programming language
    1. Conservative evolution and the C23 standard
    2. C's unique practical role
    3. Differences versus modern alternatives
  • Error handling
    1. Handling return values
    2. The [[nodiscard]] attribute (C23)
    3. Using goto to unwind failures
  • Memory pointers
    1. Thinking about memory ownership
    2. Borrowing access to objects
    3. Object lifetime considerations
  • Aliasing rules
    1. Pointers of different types to the same memory
    2. Non-overlapping memory (restrict)
    3. Room for compiler optimization
  • Memory allocation
    1. Static data, stack and heap
    2. Arenas and other allocation strategies
    3. Ensuring correct deallocation
  • Bulk memory allocation
    1. Index and pointer arithmetic
    2. Using sizeof and array sizing
    3. Memory copying and reallocation
  • Dynamic data structures
    1. Growable arrays and buffers
    2. Reallocating contiguous sequences
    3. Linked lists, trees and graphs
  • Recursive calls
    1. Direct and indirect recursion
    2. Recursion termination conditions
    3. Recursion optimization
  • Structures and abstraction
    1. Moving away from assembler-style coding
    2. Grouping related data and invariants
    3. Abstract data types and interfaces
  • Generic programming techniques
    1. The _Generic keyword
    2. Code generation using macros
    3. Type erasure, sizeof, alignof and alignas
  • Polymorphism
    1. Substructure representing a base type
    2. Implementing container_of with offsetof
    3. Example: intrusive linked list
  • Enum-based polymorphism
    1. Using enum to identify a type
    2. Allocating space with union
    3. Emulating algebraic types with enum
  • Bit and binary data handling
    1. Bitfields in structures
    2. Endianness and conversions
    3. Structure serialization
  • Object-oriented patterns
    1. Runtime information about concrete types
    2. Function pointers and operation structs (VMT)
    3. Default operations and inheritance emulation
  • Modularity
    1. Header files and #pragma once
    2. Static vs external global symbols
    3. Dynamic and header-only libraries
  • Writing correct programs
    1. Undefined behavior
    2. Using sanitizers during debugging
    3. Static analyzers
  • Bonus: External libraries
    1. SDL3
    2. libpng
    3. libcurl
    4. SQLite
Assumed knowledge:
Experience programming in the C language.
Recommended previous course:
C Language – Programming Basics (C1)
Recommended subsequent course:
C Language – Design Patterns and Object-Oriented Design (C3)
Schedule:
3 days (9:00 AM - 5:00 PM )
Language: