Contents
- Getting started
- Function pointers
- Operators
- Operators
- Relational Operators
- Conditional OperatorTernary Operator
- Bitwise Operators
- Comma Operator
- Arithmetic Operators
- Access Operators
- Short circuit behavior of logical operators
- sizeof Operator
- Increment Decrement
- Function Call Operator
- Cast Operator
- Pointer Arithmetic
- Logical Operators
- Assignment Operators
- 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 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
- Read value of pointer that was freed
- 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
- Returning from a function thats declared with Noreturn or noreturn function specifier
- 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
- Using fflush on an input stream
- Division by zero
- Missing return statement in value returning function
- Inconsistent linkage of identifiers
- Conversion between pointer types produces incorrectly aligned result
- Modifying the string returned by getenv strerror and setlocale functions
- 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
- cplusplus for using C externals in C code compiled with 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
- Freeing Memory
- Common 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 as arguments and return values to standard functions
- 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
- Tokenisation strtok strtok r and strtok s
- String literals
- Calculate the Length strlen
- Basic introduction to strings
- Copying strings
- Creating Arrays of Strings
- string formatted data readwrite
- Convert Strings to Number atoi atof dangerous dont use them
- Iterating Over the Characters in a String
- Comparsion strcmp strncmp strcasecmp strncasecmp
- Find firstlast occurrence of a specific character strchr strrchr
- Copy and Concatenation strcpy strcat
- strspn and strcspn
- Safely convert Strings to Number strtoX functions
- Zeroing out a string
- strstr
- Comman 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
- Forgetting to allocate one extra byte for 0
- Misunderstanding array decay
- Forgetting to free memory memory leaks
- Copying too much
- Mistakenly writing instead of when comparing
- Incautious use of semicolons
- Adding a semicolon to a define
- Newline character is not consumed in typical scanf call
- Checking logical expression against true
- Undefined reference errors when linking
- Doing extra scaling in pointer arithmetic
- Multi-line comments cannot be nested
- Comparing floating point numbers
- Ignoring return values of library functions
- Floating point literals are of type 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. definitio
- 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
- Constrains
- Inlining
- Unions
- Multi-threading
- Common idioms and developer practices
- Inter-process communication (IPC)
- Comments
- Contributors