Contents
- Getting started
- Function pointers
- Operators
- Operators
- Relational Operators
- Conditional operator (ternary operator)
- Bitwise operators
- Comma Operator
- Arithmetic Operators
- Access Operators
- Short circuit behavior of logical operators
- sizeof Operator
- Increment and decrement
- Function Call Operator
- Cast Operator
- Pointer arithmetic
- Logical Operators
- Assignment Operators
- Alignment requirements with alignof
- Data types
- Arrays
- Arrays
- Declaring and initializing an array
- Array length
- Iterating through an array efficiently and row-major order
- Multi-dimensional arrays
- Passing multidimensional arrays to a function
- Define array and access array element
- Allocate and zero-initialize an array with a user-defined size
- Clearing array contents zeroing
- Iterating through an array using pointers
- Setting values in arrays
- Undefined behavior
- Undefined behavior
- Dereferencing a pointer to variable beyond its lifetime
- Copying overlapping memory
- Signed integer overflow
- Use of an uninitialized variable
- Reading a Pointer Value After free
- Data race
- Modify string literal
- Using incorrect format specifier in printf
- Modifying any object more than once between two sequence points
- Passing a null pointer to printf %s conversion
- Bit shifting using negative counts or beyond the width of the type
- Freeing memory twice
- Accessing memory beyond allocated chunk
- Functions that do not return
- Addition or subtraction of pointer not properly bounded
- Modifying a const variable using a pointer
- Dereferencing a null pointer
- Reading an uninitialized object that is not backed by memory
- Do not use fflush on an input stream
- Division by zero
- Missing return statement in a value-returning function
- Inconsistent linkage of identifiers
- Conversion between pointer types produces incorrectly aligned result
- Modifying the strings returned by getenv, strerror, and setlocale
- Random numbers
- Preprocessor and macros
- Preprocessor and Macros
- Header Include Guards
- if 0 to block out code sections
- Function-like macros
- Source file inclusion
- Conditional inclusion and conditional function signature modification
- extern "C" and C++ name mangling
- Token pasting
- Predefined macros
- Variadic arguments macro
- Macro Replacement
- Error directive
- FOREACH implementation
- Signal handling
- Variable arguments
- Files and I/O streams
- Assertion
- Linked lists
- Generic selection
- X-macros
- Function parameters
- Pointers
- Pointers
- Allocating memory
- Introduction to pointers
- Freeing memory
- Common Pointer and Allocation Errors
- Reallocating Memory
- Dereferencing a Pointer
- Dereferencing a Pointer to a struct
- Const Pointers
- Function pointers
- Polymorphic behaviour with void pointers
- Initializing Pointers
- Address-of Operator
- Void pointers in standard-library interfaces
- Pointer Arithmetic
- Same Asterisk Different Meanings
- Pointer to Pointer
- Structs
- Structs
- Simple Enumeration
- Typedef Structs
- Flexible Array Members
- Pointers to structs
- Using unions to reinterpret values
- Passing structs to functions
- Object-based programming using structs
- Simple data structures
- Writing to one union member and reading from another
- Difference between struct and union
- Typedef enum
- Sequence points
- Command-line arguments
- Aliasing and effective type
- Compilation
- Identifier scope
- Bit-fields
- Strings
- Strings
- Tokenising with strtok, strtok_r, and strtok_s
- String literals
- Calculate the Length strlen
- Basic introduction to strings
- Copying strings
- Creating Arrays of Strings
- Reading and writing formatted strings
- Convert strings to numbers safely
- Iterating Over the Characters in a String
- Comparison with strcmp, strncmp, strcasecmp, and strncasecmp
- Find the first or last occurrence of a character
- Copy and Concatenation strcpy strcat
- strspn and strcspn
- Safely convert strings to numbers with strtoX functions
- Zeroing out a string
- strstr
- Common pitfalls
- Common pitfalls
- Mixing signed and unsigned integers in arithmetic operations
- Macros are simple string replacements
- Forgetting to copy the return value of realloc into a temporary
- Reserving Space for the Null Character
- Array decay and multidimensional arrays
- Memory leaks
- Bound input to the destination
- Mistakenly writing = instead of == when comparing
- Incautious use of semicolons
- Adding a semicolon to a define
- A newline remains after a typical scanf call
- Testing Boolean Conditions
- Undefined reference errors when linking
- Doing extra scaling in pointer arithmetic
- Multi-line comments cannot be nested
- Comparing floating point numbers
- Check meaningful return values
- Floating constants are double by default
- Recursive function missing out the base condition
- Using character constants instead of string literals and vice versa
- Overstepping array boundaries
- Passing unadjacent arrays to functions expecting real multidimensional arrays
- Error handling
- Implicit and explicit conversions
- Type qualifiers
- Valgrind
- Typedef
- Selection statements
- Declaration vs. definition
- Standard math
- Boolean
- Literals for numbers, characters and strings
- Storage classes
- Declarations
- Formatted Input/Output
- Compound literals
- Inline assembly
- Threads native
- Initialization
- Structure padding and packing
- Memory management
- Implementation-defined behaviour
- Atomics
- Iteration statements, loops, for, while, do-while
- Enumerations
- Jump Statements
- Create and include header files
- Testing frameworks
- ctype.h characters classification
- Pass 2D-arrays to functions
- Side effects
- Multi-character character sequences
- Constraints
- Inlining
- Unions
- Multi-threading
- Common idioms and developer practices
- Inter-process communication (IPC)
- Comments
- Contributors