Complete C Course

C23 / ISO/IEC 9899 • 60 chapters • 300 topics • code example for every topic

Chapter 1: Setup, Compiler, and C23

Setup, Compiler, and C23 Fundamentals, Setup, Compiler, and C23 Syntax and Structure, Setup, Compiler, and C23 Practical Example, Setup, Compiler, and C23 Common Mistakes, Setup, Compiler, and C23 Best Practices

Open chapter

Chapter 2: First C Program

First C Program Fundamentals, First C Program Syntax and Structure, First C Program Practical Example, First C Program Common Mistakes, First C Program Best Practices

Open chapter

Chapter 3: Variables and Constants

Declaring Variables, Initialization, Scope, Constants/Readonly Values, Naming and Safety

Open chapter

Chapter 4: Integer Types

Built-in Types, Type Conversion, Type Inference, Custom Types, Type Safety

Open chapter

Chapter 5: Floating, Boolean, and Character Types

Built-in Types, Type Conversion, Type Inference, Custom Types, Type Safety

Open chapter

Chapter 6: Operators and Expressions

Arithmetic Operators, Comparison Operators, Logical Operators, Assignment Operators, Precedence and Safe Use

Open chapter

Chapter 7: Console Input and Output

Console Input and Output Fundamentals, Console Input and Output Syntax and Structure, Console Input and Output Practical Example, Console Input and Output Common Mistakes, Console Input and Output Best Practices

Open chapter

Chapter 8: Conditions

if, else if, switch, Conditional Expressions, Decision-Logic Best Practices

Open chapter

Chapter 9: Loops

for Loop, while Loop, do/foreach Variants, break and continue, Loop Design

Open chapter

Chapter 10: Functions

Declaring Functions, Parameters, Return Values, Scope, Function Design

Open chapter

Chapter 11: Parameters, Return Values, and Scope

Parameters, Return Values, and Scope Fundamentals, Parameters, Return Values, and Scope Syntax and Structure, Parameters, Return Values, and Scope Practical Example, Parameters, Return Values, and Scope Common Mistakes, Parameters, Return Values, and Scope Best Practices

Open chapter

Chapter 12: Storage Duration and Linkage

Storage Duration and Linkage Fundamentals, Storage Duration and Linkage Syntax and Structure, Storage Duration and Linkage Practical Example, Storage Duration and Linkage Common Mistakes, Storage Duration and Linkage Best Practices

Open chapter

Chapter 13: Arrays

Declaring Arrays, Indexing Elements, Looping Through Arrays, Multidimensional Arrays, Array Safety and Common Errors

Open chapter

Chapter 14: Multidimensional Arrays

Declaring Arrays, Indexing Elements, Looping Through Arrays, Multidimensional Arrays, Array Safety and Common Errors

Open chapter

Chapter 15: C Strings

Creating Strings, Common String Operations, Searching and Comparing, Formatting and Conversion, Performance and Safety

Open chapter

Chapter 16: String Library

Creating Strings, Common String Operations, Searching and Comparing, Formatting and Conversion, Performance and Safety

Open chapter

Chapter 17: Pointers

Pointer Declaration, Address and Dereference, Pointer Arithmetic, Pointers with Arrays/Objects, Pointer Safety

Open chapter

Chapter 18: Pointer Arithmetic

Pointer Declaration, Address and Dereference, Pointer Arithmetic, Pointers with Arrays/Objects, Pointer Safety

Open chapter

Chapter 19: Arrays and Pointers

Declaring Arrays, Indexing Elements, Looping Through Arrays, Multidimensional Arrays, Array Safety and Common Errors

Open chapter

Chapter 20: Pointers to Pointers

Pointer Declaration, Address and Dereference, Pointer Arithmetic, Pointers with Arrays/Objects, Pointer Safety

Open chapter

Chapter 21: Function Pointers and Callbacks

Pointer Declaration, Address and Dereference, Pointer Arithmetic, Pointers with Arrays/Objects, Pointer Safety

Open chapter

Chapter 22: Dynamic Memory

Memory Model, Allocation, Lifetime, Ownership/References, Performance and Safety

Open chapter

Chapter 23: Structures

Structures Fundamentals, Structures Syntax and Structure, Structures Practical Example, Structures Common Mistakes, Structures Best Practices

Open chapter

Chapter 24: Unions

Unions Fundamentals, Unions Syntax and Structure, Unions Practical Example, Unions Common Mistakes, Unions Best Practices

Open chapter

Chapter 25: Enumerations and typedef

Built-in Types, Type Conversion, Type Inference, Custom Types, Type Safety

Open chapter

Chapter 26: Bitwise Programming

Bitwise Programming Fundamentals, Bitwise Programming Syntax and Structure, Bitwise Programming Practical Example, Bitwise Programming Common Mistakes, Bitwise Programming Best Practices

Open chapter

Chapter 27: Preprocessor

Macros, Conditional Compilation, Includes, Feature Flags, Preprocessor Risks

Open chapter

Chapter 28: Header Files

Opening Files, Reading Data, Writing Data, Paths and Resources, Error and Resource Handling

Open chapter

Chapter 29: Modular C Projects

Modular C Projects Fundamentals, Modular C Projects Syntax and Structure, Modular C Projects Practical Example, Modular C Projects Common Mistakes, Modular C Projects Best Practices

Open chapter

Chapter 30: Command-Line Arguments

Command-Line Arguments Fundamentals, Command-Line Arguments Syntax and Structure, Command-Line Arguments Practical Example, Command-Line Arguments Common Mistakes, Command-Line Arguments Best Practices

Open chapter

Chapter 31: Text File I/O

Opening Files, Reading Data, Writing Data, Paths and Resources, Error and Resource Handling

Open chapter

Chapter 32: Binary File I/O

Opening Files, Reading Data, Writing Data, Paths and Resources, Error and Resource Handling

Open chapter

Chapter 33: Errors, errno, and perror

Errors, errno, and perror Fundamentals, Errors, errno, and perror Syntax and Structure, Errors, errno, and perror Practical Example, Errors, errno, and perror Common Mistakes, Errors, errno, and perror Best Practices

Open chapter

Chapter 34: Assertions and Defensive Checks

Assertions and Defensive Checks Fundamentals, Assertions and Defensive Checks Syntax and Structure, Assertions and Defensive Checks Practical Example, Assertions and Defensive Checks Common Mistakes, Assertions and Defensive Checks Best Practices

Open chapter

Chapter 35: Standard Library Utilities

Standard Library Utilities Fundamentals, Standard Library Utilities Syntax and Structure, Standard Library Utilities Practical Example, Standard Library Utilities Common Mistakes, Standard Library Utilities Best Practices

Open chapter

Chapter 36: Math Library

Math Library Fundamentals, Math Library Syntax and Structure, Math Library Practical Example, Math Library Common Mistakes, Math Library Best Practices

Open chapter

Chapter 37: Character Classification

Declaring Classes, Fields and State, Methods and Behavior, Constructors, Encapsulation

Open chapter

Chapter 38: Time and Date

Time and Date Fundamentals, Time and Date Syntax and Structure, Time and Date Practical Example, Time and Date Common Mistakes, Time and Date Best Practices

Open chapter

Chapter 39: Sorting and Searching

Sorting and Searching Fundamentals, Sorting and Searching Syntax and Structure, Sorting and Searching Practical Example, Sorting and Searching Common Mistakes, Sorting and Searching Best Practices

Open chapter

Chapter 40: Recursion

Recursion Fundamentals, Recursion Syntax and Structure, Recursion Practical Example, Recursion Common Mistakes, Recursion Best Practices

Open chapter

Chapter 41: Linked Lists

Linked Lists Fundamentals, Linked Lists Syntax and Structure, Linked Lists Practical Example, Linked Lists Common Mistakes, Linked Lists Best Practices

Open chapter

Chapter 42: Stacks and Queues

Stacks and Queues Fundamentals, Stacks and Queues Syntax and Structure, Stacks and Queues Practical Example, Stacks and Queues Common Mistakes, Stacks and Queues Best Practices

Open chapter

Chapter 43: Trees

Trees Fundamentals, Trees Syntax and Structure, Trees Practical Example, Trees Common Mistakes, Trees Best Practices

Open chapter

Chapter 44: Hash Tables

Hash Tables Fundamentals, Hash Tables Syntax and Structure, Hash Tables Practical Example, Hash Tables Common Mistakes, Hash Tables Best Practices

Open chapter

Chapter 45: Generic Programming with void Pointers

Pointer Declaration, Address and Dereference, Pointer Arithmetic, Pointers with Arrays/Objects, Pointer Safety

Open chapter

Chapter 46: const, volatile, and restrict

const, volatile, and restrict Fundamentals, const, volatile, and restrict Syntax and Structure, const, volatile, and restrict Practical Example, const, volatile, and restrict Common Mistakes, const, volatile, and restrict Best Practices

Open chapter

Chapter 47: Memory Layout, Alignment, and Padding

Memory Model, Allocation, Lifetime, Ownership/References, Performance and Safety

Open chapter

Chapter 48: Flexible Array Members

Declaring Arrays, Indexing Elements, Looping Through Arrays, Multidimensional Arrays, Array Safety and Common Errors

Open chapter

Chapter 49: Variadic Functions

Declaring Functions, Parameters, Return Values, Scope, Function Design

Open chapter

Chapter 50: setjmp and longjmp

setjmp and longjmp Fundamentals, setjmp and longjmp Syntax and Structure, setjmp and longjmp Practical Example, setjmp and longjmp Common Mistakes, setjmp and longjmp Best Practices

Open chapter

Chapter 51: Signals

Signals Fundamentals, Signals Syntax and Structure, Signals Practical Example, Signals Common Mistakes, Signals Best Practices

Open chapter

Chapter 52: Atomics and Memory Ordering

Memory Model, Allocation, Lifetime, Ownership/References, Performance and Safety

Open chapter

Chapter 53: C Threads and Concurrency

Creating Threads, Shared State, Synchronization, Thread Safety, Threading Best Practices

Open chapter

Chapter 54: Processes and OS Concepts

Processes and OS Concepts Fundamentals, Processes and OS Concepts Syntax and Structure, Processes and OS Concepts Practical Example, Processes and OS Concepts Common Mistakes, Processes and OS Concepts Best Practices

Open chapter

Chapter 55: Socket Networking

Network Fundamentals, Client Connections, Server Connections, Protocols, Security and Reliability

Open chapter

Chapter 56: Embedded C Concepts

Embedded C Concepts Fundamentals, Embedded C Concepts Syntax and Structure, Embedded C Concepts Practical Example, Embedded C Concepts Common Mistakes, Embedded C Concepts Best Practices

Open chapter

Chapter 57: Performance Optimization

Performance Optimization Fundamentals, Performance Optimization Syntax and Structure, Performance Optimization Practical Example, Performance Optimization Common Mistakes, Performance Optimization Best Practices

Open chapter

Chapter 58: Secure C and Undefined Behavior

Secure C and Undefined Behavior Fundamentals, Secure C and Undefined Behavior Syntax and Structure, Secure C and Undefined Behavior Practical Example, Secure C and Undefined Behavior Common Mistakes, Secure C and Undefined Behavior Best Practices

Open chapter

Chapter 59: C23 Modern Features

C23 Modern Features Fundamentals, C23 Modern Features Syntax and Structure, C23 Modern Features Practical Example, C23 Modern Features Common Mistakes, C23 Modern Features Best Practices

Open chapter

Chapter 60: Testing, Debugging, Build Systems, and Capstone

Unit Test Basics, Arrange-Act-Assert, Edge Cases, Mocks/Fakes Concepts, Automation and Coverage

Open chapter