From Absolute Beginner to Advanced C Programmer
🌐 Interactive Website → | 📚 Course Structure | ⚡ Online Code Editor
🚀 New! Check out the interactive website with a built-in C compiler playground — write, compile, and run C code directly in your browser!
Welcome to the Complete C Programming Course — a comprehensive, open-source journey from absolute beginner to advanced C programmer. This course covers everything from basic syntax to advanced topics like machine learning, network programming, and scientific simulations, all with a built-in browser code editor.
The course features a full-featured interactive website that dynamically loads all content from this repository:
| Feature | Description | Link |
|---|---|---|
| 📚 Course Browser | Browse all 20 modules with descriptions and code examples | Modules page |
| ⚡ Code Playground | Write, compile, and run C code in your browser | Playground |
| 📖 File Documentation | Every .c file has a companion .md with detailed explanations |
In each module detail page |
| 🔍 Code Viewer | View any source file with syntax highlighting, expand to see full code | Click any file card |
| 🎨 Dark/Light Theme | Coffee-toned dark theme with warm green accents | Click the theme toggle |
| 🚀 Instant Deploy | GitHub Actions auto-deploys on every push | View workflow |
The website fetches content directly from this GitHub repository using:
- README files → Rendered as module descriptions with full markdown support
.mdcompanion files → Each.c/.hfile has a.mdfile with detailed explanations, function documentation, compilation instructions, and usage notes- Source code → Displayed with syntax highlighting and a one-click "Edit & Run" button that loads the code into the playground editor
- GitHub API → Repository stats (stars, forks) displayed on the About page
The Code Playground features:
- CodeMirror editor with C syntax highlighting, auto-closing brackets, line numbers, and foldable code
- Multi-file tabs — load multiple source files and switch between them
- Compiler Explorer backend — compiles and executes your C code using GCC 13.2 or Clang 17
- Compiler flags — choose optimization levels (
-O0through-O3) - localStorage persistence — your code and open tabs are saved automatically
- Output panel — shows stdout, stderr, compilation warnings/errors, and exit codes
- Copy output button for sharing results
Note: The online compiler is powered by Compiler Explorer. For full control, compile locally with GCC or Clang using the provided Makefiles.
This course is structured into 20 modules, each building upon the previous one. Whether you're a complete beginner or looking to master advanced C programming, this course has something for you.
- Introduction to C Programming
- Setting Up Your Development Environment
- Your First C Program (Hello World)
- Understanding Compilation Process
- Basic Input/Output
- Variables and Constants
- Primitive Data Types (int, float, char, double)
- Type Conversion and Casting
- Operators (Arithmetic, Relational, Logical, Bitwise)
- Pre/Post Increment and Decrement
- Conditional Statements (if, else, else-if)
- Switch Statement
- Loops (for, while, do-while)
- Break and Continue
- Nested Loops and Loop Performance
- Function Declaration and Definition
- Function Parameters and Return Types
- Scope and Lifetime
- Recursion
- Function Pointers
- One-Dimensional Arrays
- Multi-Dimensional Arrays
- Character Arrays and Strings
- String Manipulation without string.h
- Common String Operations
- Introduction to Pointers
- Pointer Arithmetic
- Pointers and Arrays
- Pointer to Pointer
- Pointers and Functions
- Stack vs Heap Memory
- Dynamic Memory Allocation (malloc, calloc, realloc, free)
- Memory Leaks and Debugging
- Custom Memory Allocators
- Memory Management Best Practices
- Defining Structures
- Nested Structures
- Arrays of Structures
- Pointers to Structures
- Unions and Bit Fields
- typedef and enum
- File Handling Basics
- Reading and Writing Text Files
- Binary File Operations
- File Positioning
- Error Handling in File Operations
- Preprocessor Directives
- Macros and Macro Functions
- Conditional Compilation
- Header Guards
- Common Preprocessor Tricks
- Linked Lists (Singly, Doubly, Circular)
- Stacks and Queues
- Hash Tables
- Implementation and Complexity Analysis
- Visualization with Mermaid Diagrams
- Binary Trees and Binary Search Trees
- AVL Trees and Red-Black Trees
- Heaps and Priority Queues
- Graphs (Representation and Traversal)
- Tries and Suffix Trees
- Complete DSA with Visual Diagrams
- Introduction to GDB
- Setting Breakpoints
- Stepping Through Code
- Examining Variables and Memory
- Advanced GDB Techniques
- Debugging Memory Issues
- Introduction to GTK4
- Setting Up GTK4 Development
- Creating Windows and Widgets
- Event Handling
- Building a Simple GUI Application
- GTK4 Best Practices
- Console-Based Tic-Tac-Toe
- Snake Game
- Sudoku Solver
- Simple Platformer Basics
- Game Loop and State Management
- Socket Programming Basics
- TCP/IP Communication
- UDP Programming
- HTTP Client/Server Implementation
- Multi-threaded Servers
- Network Protocol Implementation
- Introduction to ML Concepts
- Perceptron Implementation
- Simple Neural Networks from Scratch
- Activation Functions
- Forward and Backward Propagation
- Training Neural Networks
- Understanding MNIST Dataset
- Image Processing in C
- Building a Digit Recognizer
- Training and Testing
- Optimization Techniques
- Complete Working Project
- Numerical Methods
- Matrix Operations
- Molecular Dynamics Simulations
- Physics Simulations
- Data Visualization
- Performance Optimization
- Build Systems (Make, CMake)
- Unit Testing in C
- Code Style and Standards
- Version Control Best Practices
- Profiling and Optimization
- Writing Maintainable Code
Start with Module 01 and work through Modules 1-5 sequentially. Take your time with each concept.
You might skim Modules 1-3 and focus more on Modules 4-10.
Jump to Modules 6-15, focusing on areas where you need improvement.
Modules 16-20 provide cutting-edge applications of C programming.
- Read the Theory: Each module starts with conceptual explanations
- Study the Examples: Carefully examine the provided code examples
- Compile and Run: Use the provided Makefiles to compile examples
- Learn from Bugs: Study the buggy examples to understand common mistakes
- Practice: Complete the exercises at the end of each section
- Build Projects: Apply your knowledge in the projects
- Review: Revisit difficult concepts and practice more
- A computer (Windows, macOS, or Linux)
- A C compiler (GCC or Clang - both supported)
- A text editor or IDE (VS Code, CLion, Vim, etc.)
- Basic command-line knowledge
- Enthusiasm to learn!
Each module includes a Makefile for easy compilation:
# Navigate to any module
cd 03-control-flow
# Compile all programs
make
# Run programs
./conditionals
./loops
./switch_demo
# Clean up compiled files
make clean
# Use Clang instead of GCC
make CC=clangFor detailed compilation instructions, see COMPILATION_GUIDE.md
Most modules support these targets:
make- Compile all programsmake clean- Remove compiled filesmake run- Compile and run all programsmake run-buggy- Run buggy examples (educational)make debug- Compile with debug symbolsmake asan- Compile with AddressSanitizer (memory error detection)
# Module 03: Control Flow
cd 03-control-flow
make # Compile with GCC
make CC=clang # Compile with Clang
make run # Run all correct examples
make run-buggy # Run buggy examples
# Module 06: Pointers
cd ../06-pointers
make asan # Compile with memory sanitizer
./pointer_basics
# Module 07: Memory Management
cd ../07-memory-management
make valgrind # Run with Valgrind (if installed)- Progressive Learning: Concepts build upon each other logically
- Visual Aids: Mermaid diagrams for data structures and algorithms
- Hands-on Projects: Real-world applications in every advanced module
- Best Practices: Learn industry-standard coding practices
- Complete Examples: Every concept is demonstrated with working code
- Buggy Examples: Learn from deliberately wrong code with explanations
- Compilation Guide: Comprehensive guide for GCC and Clang with all flags explained
- Makefiles: Each module includes a Makefile with detailed flag documentation
- Memory Safety: Examples include sanitizers for detecting memory errors
- Exercises: Reinforce learning with practical problems
The fundamentals directory contains additional beginner-friendly examples, including an error handling and defensive programming module covering errno, return codes, input validation, and safe coding patterns.
The notes directory provides LaTeX reference notes for each module.
Build them to PDF with make inside the notes/ directory, or compile individually
with pdflatex module-XX.tex. See notes/README.md for details.
- Compilation Guide: Complete guide to GCC and Clang compiler flags
- Contributing Guide: Code style, module structure, and contribution guidelines
- Doxyfile: Generate API documentation with
doxygen Doxyfile
- Makefiles: Each module has a Makefile with detailed comments
- Buggy Code: Learn from common mistakes with
*_buggy.cfiles - Cheat Sheets: Quick reference guides in each module
- Common Pitfalls: Learn from common mistakes
This is an educational resource. If you find errors or want to suggest improvements, please see the Contributing Guide for instructions.
This course is released under the MIT License. See LICENSE for details.
Ready to begin? Head over to Module 01: Getting Started with C and start your journey!
C Programming Learn C C Tutorial Programming Course C Language Pointers Memory Management Data Structures Algorithms Embedded Systems Systems Programming GCC Clang Makefile GDB Debugging GTK4 Network Programming Machine Learning Scientific Computing Open Source MIT License C for Beginners Advanced C Computer Science
Happy Coding! 🚀
Remember: The best way to learn programming is by doing. Don't just read the code—type it out, modify it, break it, and fix it. That's how you truly learn!