Loading...
Loading...
Master C programming with our comprehensive tutorial series. Follow the structured path or jump to any topic you want to learn.
Recommended next
Track Your Learning Progress
Sign in to save your progress and sync across devices
Follow these tutorials in order for the best learning experience
Discover why C is still one of the most important programming languages after 50+ years. Learn its history, where it's used today, and why learning C gives you an edge in your programming career.
Understand what programming really is before writing any code. Learn why we program, types of programming languages, and key concepts every beginner should know.
Learn what algorithms are and how to write step-by-step solutions to problems. Understand the building blocks of all computer programs.
Learn to draw flowcharts - visual diagrams that represent algorithms. Master the standard symbols for start, process, decision, and input/output.
Your first step into C programming! Learn how to install a compiler, set up your computer, and write your very first "Hello World" program. No prior experience needed.
Learn the fundamental building blocks of C programs. Understand the main() function, how to write comments, and why proper formatting makes code readable.
Learn to store different kinds of data: numbers (int), decimals (float), and characters (char). Understand how much memory each type uses.
Learn the rules for naming things in C - variables, functions, and more. Know what names are valid, and follow naming conventions that professionals use.
Learn all 32 reserved words in C that have special meaning. These words are reserved by C and cannot be used as variable names.
Make your programs interactive! Learn to display output with printf() and read user input with scanf(). Essential for every C program.
Master escape sequences like \n (newline), \t (tab), \\ (backslash), and \" (quotes). Essential for formatting output and handling special characters.
Learn all the operators in C: math (+, -, *, /), comparisons (==, <, >), and logical operations (&&, ||). Build expressions that compute values.
Understand which operators are evaluated first. Learn the PUMAS REBL TAC memory trick and when to use parentheses.
Learn how to convert between data types in C. Master implicit (automatic) and explicit (manual) type casting, avoid integer division bugs, and understand when data loss occurs.
Understand where variables can be accessed in your program. Learn the difference between local and global scope, block scope, variable shadowing, and best practices for clean code.
Create named constants for better code readability. Instead of using 0, 1, 2 for days, use MON, TUE, WED with enums.
Master debugging! Learn all error types: Syntax, Semantic, Linker, Runtime, Logical, and Unreachable Code errors with examples and fixes.
Avoid the pitfalls every C beginner faces! Learn about the most common mistakes: = vs ==, integer division, array bounds, uninitialized variables, string issues, and pointer problems.
Make your programs smart! Use if-else to make decisions and switch for multiple choices. Programs can now respond differently to different situations.
Repeat actions automatically! Master for, while, and do-while loops. Learn which loop to use when, and how to control loops with break and continue.
Organize code into reusable blocks! Functions let you write code once and use it many times. Learn to create, call, and pass data to functions.
Functions that call themselves! Learn this powerful technique, understand how it uses the stack, and know when to use it.
Store multiple values of the same type together! Learn 1D arrays (lists), 2D arrays (tables), and how arrays are stored in memory.
Strings are character arrays ending with \0. Learn to create strings, read them safely, and use string functions like strlen, strcpy, strcmp.
Group related data together! Create your own data types with struct. Store a student's name, age, and grade in one variable.
Unions are like structures but all members share the same memory. Useful for saving memory when you only need one field at a time.
The most powerful feature in C! Pointers store memory addresses. Learn what they are, why they matter, and how to use them safely.
Read and write files! Learn fopen, fclose, fprintf, fscanf, and more. Save data permanently and load it back.
See how C programs are organized in RAM! Learn about Stack, Heap, Data, BSS, and Text segments. Essential for understanding memory.
The static keyword gives variables memory that persists between function calls. Learn how static creates "sticky" variables and private globals.
Control how variables live and where they are stored. Learn auto, static, register, and extern - the four storage classes in C.
Allocate memory at runtime! Use malloc, calloc, realloc, and free. Create arrays whose size you don't know until the program runs.
Add and subtract with pointers! Learn how pointer math works with arrays and why ptr++ moves by the size of the data type.
Combine structs with malloc! Create dynamic arrays of structures that grow as needed. Build real data structures.
Learn the fundamental data structure of linked lists. Create singly linked lists, doubly linked lists, and perform operations like insertion, deletion, and traversal.
A comprehensive overview of all C standard library headers. Learn what each header provides, when to use them, and how they work together.
Complete reference for stdio.h - all printf, scanf, and file functions with prototypes, parameters, and examples.
Complete reference for stdlib.h - memory allocation, string conversion, random numbers, sorting, and program control.
Complete reference for string.h - strlen, strcpy, strcat, strcmp, searching, and memory functions.
Complete reference for math.h - power, roots, trigonometry, logarithms, and rounding functions.
Complete reference for ctype.h - character classification (isalpha, isdigit) and conversion (toupper, tolower).
Complete reference for time.h - getting time, formatting dates, measuring durations, and working with timestamps.
Complete reference for stdbool.h - bool type, true/false values, and boolean best practices in C99+.
Complete reference for limits.h - integer limits, overflow prevention, and portable code with INT_MAX, INT_MIN, etc.
Complete reference for stddef.h - NULL, size_t, ptrdiff_t, offsetof, and fundamental type definitions.
Complete reference for errno.h - error handling with errno, perror(), strerror(), and common error codes.
Complete reference for assert.h - runtime assertions, NDEBUG, static_assert (C11), and debugging best practices.
Complete reference for stdint.h - fixed-width integers (int8_t, int32_t), limit macros, and portable integer code.
Interact with the operating system directly! Learn open, read, write, fork, exec, and other system calls that give C its power on UNIX/Linux.
Code that runs before compilation! Learn #include, #define macros, and conditional compilation with #ifdef.
Store functions in variables! Pass functions as arguments, create callbacks, and build flexible code.
Work with individual bits! Set, clear, toggle, and check bits. Implement permission systems and flags efficiently.
Master the const and volatile type qualifiers. Learn to create read-only variables, pointers to const, const pointers, and understand volatile for hardware programming.
Pack data efficiently with bit fields! Learn to define structure members that use specific numbers of bits, saving memory in embedded systems and protocols.
Understand runtime errors in C: Division by zero, Segmentation faults, Memory leaks, Buffer overflows. Learn prevention and error handling techniques.
Learn C graphics programming! Draw circles, ellipses, rectangles, and more using graphics.h. Covers OS/compiler support, setup instructions, and modern alternatives.
Learn to pass data to your programs when running them! Master argc and argv, parse command line flags, and build powerful CLI tools.
Organize large projects into multiple files! Learn about header files, source files, the extern keyword, and how to compile multi-file programs.
Automate your build process with Makefiles! Learn to compile multi-file projects with a single command, use variables, and create professional build systems.
Master the GNU Debugger! Learn to install GDB on Windows, Linux, and macOS, set breakpoints, step through code, inspect variables, and find bugs like a professional developer.
Master LLDB, the modern debugger for macOS and Linux! Learn installation, essential commands, and how to transition from GDB. Perfect for Xcode and Clang users.
Deep dive into header files! Learn to create your own .h files, understand include guards, organize declarations, and follow best practices for modular code.
Master the C11 standard! Learn about _Generic, _Noreturn, static_assert, anonymous structs/unions, aligned_alloc, threads, and atomics introduced in C11.
Explore the newest C standard! Learn about typeof, constexpr, nullptr, _BitInt, bool/true/false as keywords, [[attributes]], and other C23 improvements.
Learn parallel programming in C! Master pthreads (POSIX threads), C11 threads, mutex locks, condition variables, and thread synchronization.
Handle UNIX/Linux signals in C! Learn about SIGINT, SIGTERM, SIGSEGV, signal handlers, sigaction, and writing signal-safe code.
Read and modify environment variables in C! Learn getenv(), setenv(), unsetenv(), environ array, and how to configure program behavior via environment.
Find memory bugs with professional tools! Learn Valgrind, AddressSanitizer (ASan), and how to detect memory leaks, buffer overflows, and use-after-free errors.
Create functions that accept a variable number of arguments like printf! Master va_list, va_start, va_arg, va_end, and va_copy to build flexible, reusable functions.
Understand why compilers add padding to structures. Learn about memory alignment requirements, how to minimize padding, and packed structures for embedded systems.
Understand byte order in multi-byte data. Learn the difference between big-endian and little-endian, how to detect endianness, and convert between formats for networking and file I/O.
Master non-local jumps for exception-like error handling in C. Learn how setjmp saves execution state and longjmp restores it, with practical use cases and important caveats.
Begin your C programming journey
Discover why C is still one of the most important programming languages after 50+ years. Learn its history, where it's used today, and why learning C gives you an edge in your programming career.
Understand what programming really is before writing any code. Learn why we program, types of programming languages, and key concepts every beginner should know.
Learn what algorithms are and how to write step-by-step solutions to problems. Understand the building blocks of all computer programs.
Learn to draw flowcharts - visual diagrams that represent algorithms. Master the standard symbols for start, process, decision, and input/output.
Your first step into C programming! Learn how to install a compiler, set up your computer, and write your very first "Hello World" program. No prior experience needed.
Core concepts of C programming
Learn the fundamental building blocks of C programs. Understand the main() function, how to write comments, and why proper formatting makes code readable.
Learn to store different kinds of data: numbers (int), decimals (float), and characters (char). Understand how much memory each type uses.
Learn the rules for naming things in C - variables, functions, and more. Know what names are valid, and follow naming conventions that professionals use.
Learn all 32 reserved words in C that have special meaning. These words are reserved by C and cannot be used as variable names.
Make your programs interactive! Learn to display output with printf() and read user input with scanf(). Essential for every C program.
Master escape sequences like \n (newline), \t (tab), \\ (backslash), and \" (quotes). Essential for formatting output and handling special characters.
Learn all the operators in C: math (+, -, *, /), comparisons (==, <, >), and logical operations (&&, ||). Build expressions that compute values.
Understand which operators are evaluated first. Learn the PUMAS REBL TAC memory trick and when to use parentheses.
Learn how to convert between data types in C. Master implicit (automatic) and explicit (manual) type casting, avoid integer division bugs, and understand when data loss occurs.
Understand where variables can be accessed in your program. Learn the difference between local and global scope, block scope, variable shadowing, and best practices for clean code.
Create named constants for better code readability. Instead of using 0, 1, 2 for days, use MON, TUE, WED with enums.
Master debugging! Learn all error types: Syntax, Semantic, Linker, Runtime, Logical, and Unreachable Code errors with examples and fixes.
Avoid the pitfalls every C beginner faces! Learn about the most common mistakes: = vs ==, integer division, array bounds, uninitialized variables, string issues, and pointer problems.
Decision making and loops
Make your programs smart! Use if-else to make decisions and switch for multiple choices. Programs can now respond differently to different situations.
Repeat actions automatically! Master for, while, and do-while loops. Learn which loop to use when, and how to control loops with break and continue.
Modular programming with functions
Organize code into reusable blocks! Functions let you write code once and use it many times. Learn to create, call, and pass data to functions.
Functions that call themselves! Learn this powerful technique, understand how it uses the stack, and know when to use it.
Working with collections
Store multiple values of the same type together! Learn 1D arrays (lists), 2D arrays (tables), and how arrays are stored in memory.
Strings are character arrays ending with \0. Learn to create strings, read them safely, and use string functions like strlen, strcpy, strcmp.
Custom data structures
Group related data together! Create your own data types with struct. Store a student's name, age, and grade in one variable.
Unions are like structures but all members share the same memory. Useful for saving memory when you only need one field at a time.
Understanding memory addresses
The most powerful feature in C! Pointers store memory addresses. Learn what they are, why they matter, and how to use them safely.
Learn the fundamental data structure of linked lists. Create singly linked lists, doubly linked lists, and perform operations like insertion, deletion, and traversal.
Reading and writing files
How memory works and dynamic allocation
See how C programs are organized in RAM! Learn about Stack, Heap, Data, BSS, and Text segments. Essential for understanding memory.
The static keyword gives variables memory that persists between function calls. Learn how static creates "sticky" variables and private globals.
Control how variables live and where they are stored. Learn auto, static, register, and extern - the four storage classes in C.
Allocate memory at runtime! Use malloc, calloc, realloc, and free. Create arrays whose size you don't know until the program runs.
Add and subtract with pointers! Learn how pointer math works with arrays and why ptr++ moves by the size of the data type.
Combine structs with malloc! Create dynamic arrays of structures that grow as needed. Build real data structures.
Understand why compilers add padding to structures. Learn about memory alignment requirements, how to minimize padding, and packed structures for embedded systems.
Understand byte order in multi-byte data. Learn the difference between big-endian and little-endian, how to detect endianness, and convert between formats for networking and file I/O.
C standard library reference
A comprehensive overview of all C standard library headers. Learn what each header provides, when to use them, and how they work together.
Complete reference for stdio.h - all printf, scanf, and file functions with prototypes, parameters, and examples.
Complete reference for stdlib.h - memory allocation, string conversion, random numbers, sorting, and program control.
Complete reference for string.h - strlen, strcpy, strcat, strcmp, searching, and memory functions.
Complete reference for math.h - power, roots, trigonometry, logarithms, and rounding functions.
Complete reference for ctype.h - character classification (isalpha, isdigit) and conversion (toupper, tolower).
Complete reference for time.h - getting time, formatting dates, measuring durations, and working with timestamps.
Complete reference for stdbool.h - bool type, true/false values, and boolean best practices in C99+.
Complete reference for limits.h - integer limits, overflow prevention, and portable code with INT_MAX, INT_MIN, etc.
Complete reference for stddef.h - NULL, size_t, ptrdiff_t, offsetof, and fundamental type definitions.
Complete reference for errno.h - error handling with errno, perror(), strerror(), and common error codes.
Complete reference for assert.h - runtime assertions, NDEBUG, static_assert (C11), and debugging best practices.
Complete reference for stdint.h - fixed-width integers (int8_t, int32_t), limit macros, and portable integer code.
Deep dive into C
Interact with the operating system directly! Learn open, read, write, fork, exec, and other system calls that give C its power on UNIX/Linux.
Code that runs before compilation! Learn #include, #define macros, and conditional compilation with #ifdef.
Store functions in variables! Pass functions as arguments, create callbacks, and build flexible code.
Work with individual bits! Set, clear, toggle, and check bits. Implement permission systems and flags efficiently.
Master the const and volatile type qualifiers. Learn to create read-only variables, pointers to const, const pointers, and understand volatile for hardware programming.
Pack data efficiently with bit fields! Learn to define structure members that use specific numbers of bits, saving memory in embedded systems and protocols.
Understand runtime errors in C: Division by zero, Segmentation faults, Memory leaks, Buffer overflows. Learn prevention and error handling techniques.
Learn C graphics programming! Draw circles, ellipses, rectangles, and more using graphics.h. Covers OS/compiler support, setup instructions, and modern alternatives.
Learn to pass data to your programs when running them! Master argc and argv, parse command line flags, and build powerful CLI tools.
Organize large projects into multiple files! Learn about header files, source files, the extern keyword, and how to compile multi-file programs.
Automate your build process with Makefiles! Learn to compile multi-file projects with a single command, use variables, and create professional build systems.
Master the GNU Debugger! Learn to install GDB on Windows, Linux, and macOS, set breakpoints, step through code, inspect variables, and find bugs like a professional developer.
Master LLDB, the modern debugger for macOS and Linux! Learn installation, essential commands, and how to transition from GDB. Perfect for Xcode and Clang users.
Deep dive into header files! Learn to create your own .h files, understand include guards, organize declarations, and follow best practices for modular code.
Master the C11 standard! Learn about _Generic, _Noreturn, static_assert, anonymous structs/unions, aligned_alloc, threads, and atomics introduced in C11.
Explore the newest C standard! Learn about typeof, constexpr, nullptr, _BitInt, bool/true/false as keywords, [[attributes]], and other C23 improvements.
Learn parallel programming in C! Master pthreads (POSIX threads), C11 threads, mutex locks, condition variables, and thread synchronization.
Handle UNIX/Linux signals in C! Learn about SIGINT, SIGTERM, SIGSEGV, signal handlers, sigaction, and writing signal-safe code.
Read and modify environment variables in C! Learn getenv(), setenv(), unsetenv(), environ array, and how to configure program behavior via environment.
Find memory bugs with professional tools! Learn Valgrind, AddressSanitizer (ASan), and how to detect memory leaks, buffer overflows, and use-after-free errors.
Create functions that accept a variable number of arguments like printf! Master va_list, va_start, va_arg, va_end, and va_copy to build flexible, reusable functions.
Master non-local jumps for exception-like error handling in C. Learn how setjmp saves execution state and longjmp restores it, with practical use cases and important caveats.
Let us know what topic you need help with on GitHub Discussions!
Request a Topic