A complete, open-source curriculum that teaches you C by building a portfolio of real-world tools and applications from scratch. This course uses a unique, hands-on teaching method: the lesson is in the code. You'll learn every concept from structured comments inside a single, runnable C file for each topic.
- Learn Directly In The Code: Every lesson is taught within the comments of a single, runnable C file
- Zero Prerequisites: Designed for absolute beginners with no programming experience
- Project-Based Learning: Build real command-line tools, games, and systems applications
- Memory Safety Focus: Learn secure C development practices from the beginning
- Complete Portfolio: From console apps to multithreaded systems programming
- Open Source Excellence: Community-driven curriculum with comprehensive documentation
├── Part1_Core_Concepts/ # Beginner fundamentals
│ ├── 01_HelloWorld/ # First program and compilation
│ ├── 02_Variables/ # Data types and memory
│ ├── 03_UserInput/ # Interactive programs
│ ├── 04_Operators/ # Calculations and logic
│ ├── 05_Conditionals/ # Decision making
│ ├── 06_Loops/ # Repetition and iteration
│ ├── 07_Functions/ # Modular programming
│ ├── 08_Arrays/ # Data collections
│ └── 09_Strings/ # Text manipulation
├── Part2_Deeper_into_C/ # Intermediate concepts
│ ├── 10_Pointers/ # Memory addresses
│ ├── 11_PointersArrays/ # Pointer arithmetic
│ ├── 12_Structs/ # Custom data types
│ ├── 13_DynamicMemory/ # malloc and memory management
│ ├── 14_FileIO/ # Persistent data storage
│ └── 15_CommandLine/ # argc and argv
├── Part3_Advanced_Path/ # Advanced programming
│ ├── 16_Calculator/ # First complete project
│ ├── 17_StudentRecords/ # Database application
│ ├── 18_FunctionPointers/ # Callbacks and dispatch
│ ├── 19_Recursion/ # Recursive algorithms
│ ├── 20_LinkedLists/ # Dynamic data structures
│ ├── 21_BitManipulation/ # Low-level programming
│ ├── 22_Preprocessor/ # Multi-file projects
│ ├── 23_UnionsEnums/ # Specialized types
│ ├── 24_StaticExtern/ # Variable scope and linkage
│ └── 25_TextEditor/ # Capstone text editor
├── Part4_Systems_Programming/ # Operating system interaction
│ ├── 26_SocketServer/ # Network programming
│ ├── 27_BuildGrep/ # Command-line tools
│ ├── 28_HashTable/ # Data structure implementation
│ ├── 29_TinyShell/ # Process management
│ └── 30_MultithreadedAnalyzer/ # Concurrent programming
└── Part5_Expert_Applications/ # Large-scale development
├── 31_Makefiles/ # Build automation
├── 32_ExternalLibraries/ # Library linking
├── 33_TerminalUI/ # ncurses interfaces
├── 34_DataParsing/ # Configuration files
└── 35_TextAdventure/ # Final capstone RPG
Prerequisites: LLVM/Clang 15+ or GCC 11+
# 1. Clone the repository
git clone https://github.com/dunamismax/c-from-the-ground-up.git
cd c-from-the-ground-up
# 2. Navigate to first lesson
cd Part1_Core_Concepts/01_HelloWorld
# 3. Compile and run your first program
gcc -Wall -Wextra -std=c11 -o hello_world 1_hello_world.c
./hello_world
The curriculum is designed to be self-contained with each lesson building upon previous concepts.
C provides unmatched control over system resources and memory management. This curriculum demonstrates how to learn C through practical application, building real-world skills while understanding fundamental computer science concepts.
Traditional Courses | This Course |
---|---|
Theory then practice | Code-first learning |
Separate textbooks | Lessons in the code |
Abstract examples | Real-world projects |
Basic syntax focus | Systems programming ready |
Single project at end | Portfolio of applications |
Generic approach | Memory safety emphasis |
Master C fundamentals through single-file console applications covering variables, functions, arrays, and strings.
Explore pointers, dynamic memory allocation, file I/O, and command-line arguments for robust program development.
Build complete projects including calculators, databases, and text editors while learning recursion and data structures.
Create network applications, command-line tools, and multithreaded programs that interact with the operating system.
Develop large-scale applications using external libraries, advanced UI frameworks, and comprehensive build systems.
- Compiler: GCC or LLVM Clang with C11 standards compliance
- Build System: Make for automating complex multi-file projects
- Libraries: ncurses for terminal UI, POSIX threads for concurrency
- Tools: Standard development tools for cross-platform compatibility
- Methodology: Single-file lessons progressing to multi-file applications
Works on all major platforms with C compiler support:
- macOS: Native development with Xcode command line tools
- Linux: GCC and Clang with standard development packages
- Windows: MinGW-w64, Clang, or Windows Subsystem for Linux
Command-Line Tools:
- Scientific calculator with advanced mathematical operations
- Custom grep implementation with pattern matching
- Tiny shell with process management and command execution
Interactive Applications:
- Student record management system with file persistence
- Line-based text editor with full editing capabilities
- Text adventure RPG with ncurses interface and save system
Systems Programming:
- Socket-based client-server networking applications
- Multithreaded file analyzer using POSIX threads
- Hash table implementation with collision resolution
- Dynamic memory allocation with proper cleanup patterns
- Buffer overflow prevention and bounds checking
- Secure coding practices and input validation
- Understanding pointer safety and null checking
- C11 standard compliance with modern language features
- Professional debugging techniques and error handling
- Code organization and modular programming principles
- Cross-platform compatibility considerations
- Process creation and management with fork/exec
- Inter-process communication and signal handling
- Network programming with sockets and protocols
- Concurrent programming with threads and synchronization
# Navigate to any lesson
cd Part1_Core_Concepts/01_HelloWorld
# Read the lesson (comments in the .c file)
cat 1_hello_world.c
# Compile with recommended flags
gcc -Wall -Wextra -std=c11 -o program file.c
# Run the program
./program
# For later lessons with Makefiles
make
./program
Every concept is taught directly within working C programs. No separate textbooks or theory-heavy explanations - the code itself contains comprehensive comments explaining every detail.
Start with printf("Hello, World!");
and end with a complete text adventure game using ncurses, file I/O, and advanced data structures.
Build actual tools and applications that solve real problems, creating a portfolio of work that demonstrates practical C programming abilities.
Learn secure C development practices from day one, understanding how to prevent common vulnerabilities while leveraging C's power.
This project is community-driven and welcomes contributions:
- Bug Reports: Found an issue? Open a GitHub issue
- Improvements: Better explanations or code? Submit a pull request
- New Lessons: Have ideas for additional projects? Let's discuss them
- Feedback: Share your learning experience and suggestions
This project is licensed under the MIT License - see the LICENSE file for details.
C From The Ground Up
Code-First Learning • Project-Based Curriculum • Memory Safe • Zero Prerequisites • Portfolio Building