CodeBlanks Logo Icon CodeBlanks
Free 4 levels C

C

Learn C17 from variables to pointers, systems programming and kernel basics with hands-on projects.

The C course covers all levels with variables, pointers, memory management, file I/O, multi-file projects, POSIX, socket programming, pthreads, kernel basics and compiler construction.

  • 362 lessons
  • 30 h 11 min
  • 10 projects

No account needed, you can start right away. To save your progress, create a free account

Levels

The C course goes from zero to expert in four levels. Start at any level you like.
Not sure of your level? Take the placement test
Beginner

Learn C17 fundamentals: variables, data types, loops, arrays, functions, pointers and memory management.

  • C basics
  • Variables
  • Data types
  • Operators
116 lessons · 9 h 16 min See lessons →
Intermediate

Learn advanced pointers, file I/O, structures, unions, dynamic memory and multi-file projects in C.

  • Advanced pointers
  • Memory management
  • Advanced string handling
  • Function pointers
116 lessons · 9 h 55 min See lessons →
Advanced

Learn systems programming, POSIX, socket programming, multithreading, signal handling and memory safety in C.

  • POSIX basics
  • Process management
  • Signal handling
  • Pthreads
83 lessons · 7 h 0 min See lessons →
Expert

Learn kernel programming, driver basics, compiler construction, security and modern C in C.

  • Kernel basics
  • Driver basics
  • Compiler basics
  • Security
47 lessons · 4 h 0 min See lessons →

Projects you will build

At every level you combine what you learned into a real page.

How does it work?

Short explanation

Each lesson explains one concept in a few short cards; no long videos or walls of text.

Try it right away

Multiple choice, fill-in-the-blank and matching exercises lock in what you just learned.

Write it yourself

You write real code in the in-browser editor; it is checked instantly and you see the result live.

Curriculum

62 groups · 362 lessons · 30 h 11 min

Learn C17 fundamentals: variables, data types, loops, arrays, functions, pointers and memory management.

1
C basics
6 lessons · 23 min
  1. 1 What is C? Learn that C is a powerful, low-level systems language and the compilation process. 4 min
  2. 2 Your first program Learn to write your first C program with the main function, #include and printf. 4 min
  3. 3 Compile and run Learn to compile and run a C program with gcc. 3 min
  4. 4 Comments Learn to write single-line (//) and multi-line (/* */) comments in C. 3 min
  5. 5 printf and escapes Learn formatted output with printf and escape sequences. 4 min
  6. 6 Summary - C basics Combine main, printf and comments to write your first C program. 5 min
2
Variables
6 lessons · 24 min
  1. 1 Declaring variables Learn to declare variables of type int, double, char and float. 4 min
  2. 2 Variable assignment Learn to assign and initialize values to variables. 4 min
  3. 3 const Learn to declare immutable variables with the const keyword. 3 min
  4. 4 Variable scope Learn the scope of local and global variables. 4 min
  5. 5 typedef Learn to give new names to types with typedef. 4 min
  6. 6 Summary - Variables Declare typed variables to write a small profile program. 5 min
3
Data types
6 lessons · 24 min
  1. 1 Integer types Learn int, short, long, long long and unsigned types. 4 min
  2. 2 Floating-point types Learn float, double and long double types. 4 min
  3. 3 char Learn to store single characters with char. 3 min
  4. 4 sizeof Learn type sizes with the sizeof operator. 4 min
  5. 5 Type conversion Learn implicit and explicit (cast) type conversion. 4 min
  6. 6 Summary - Data types Combine integer, floating-point and char types to write a calculation card. 5 min
4
Project: CalculatorProject
5 lessons · 30 min
  1. 1 Project design Design the structure of the calculator project and write the skeleton code. 6 min
  2. 2 Add and subtract Add and test the addition and subtraction functions. 6 min
  3. 3 Multiply and divide Add multiplication, division and the divide-by-zero check. 6 min
  4. 4 Menu loop Write a menu loop with switch-case. 6 min
  5. 5 Putting it together Combine all parts into a working calculator. 6 min
5
Operators
6 lessons · 26 min
  1. 1 Arithmetic operators Learn basic arithmetic with +, -, *, / and %. 4 min
  2. 2 Assignment operators Learn shortcut assignments with =, +=, -=, *=, /= and ++/--. 4 min
  3. 3 Comparison operators Learn to compare values with ==, !=, <, >, <= and >=. 4 min
  4. 4 Logical operators Learn boolean logic with &&, || and !. 4 min
  5. 5 Bitwise operators Learn bitwise operations with &, |, ^, ~, << and >>. 5 min
  6. 6 Summary - Operators Combine arithmetic, comparison and bitwise operators to build a grade calculator. 5 min
6
I/O
6 lessons · 27 min
  1. 1 printf formatting Learn printf format specifiers (%d, %f, %s, %c). 4 min
  2. 2 scanf Learn to read input from the user with scanf. 4 min
  3. 3 Multiple inputs Learn to read multiple values with a single scanf. 4 min
  4. 4 getchar and putchar Learn to read and write single characters with getchar and putchar. 5 min
  5. 5 puts and fputs Learn to print strings with puts and fputs. 5 min
  6. 6 Summary - I/O Combine printf, scanf and getchar to write an interactive menu. 5 min
7
Conditionals
6 lessons · 27 min
  1. 1 The if statement Learn how to check a condition with if and the code block. 4 min
  2. 2 else and else if Learn else and else if chains for alternative cases. 4 min
  3. 3 The switch statement Learn multi-way selection with switch, case, break and default. 5 min
  4. 4 The ternary operator Learn to write a conditional expression in one line with ? :. 4 min
  5. 5 Nested conditionals Learn to build complex logic with nested if and switch. 5 min
  6. 6 Summary - Conditionals Combine if, switch and ternary to write a day-of-week app. 5 min
8
Loops
6 lessons · 26 min
  1. 1 The for loop Learn to write counted loops with for and use a counter. 4 min
  2. 2 The while loop Learn loops that run while a condition holds with while. 4 min
  3. 3 The do-while loop Learn loops that run at least once with do-while. 4 min
  4. 4 break and continue Learn to exit a loop with break and skip with continue. 4 min
  5. 5 Nested loops Learn to print matrices and tables with nested for loops. 5 min
  6. 6 Summary - Loops Combine for, while and nested loops to write a multiplication table. 5 min
9
Project: Shopping cartProject
5 lessons · 30 min
  1. 1 Cart design Design the structure and array for the shopping cart. 6 min
  2. 2 Adding products Write the function that adds products to the cart. 6 min
  3. 3 Calculating totals Learn to compute the subtotal and the tax-inclusive total. 6 min
  4. 4 Listing the cart Write the function that prints the cart items formatted. 6 min
  5. 5 Putting it together Combine the cart functions with a menu. 6 min
10
Arrays
6 lessons · 26 min
  1. 1 Declaring arrays Learn to declare and initialize arrays with int[] and double[]. 4 min
  2. 2 Array access Learn to access and modify array elements by index. 4 min
  3. 3 Array size Learn to compute the array size with sizeof. 3 min
  4. 4 Multidimensional arrays Learn multidimensional arrays as matrices with int[][]. 5 min
  5. 5 Arrays and loops Learn to iterate over arrays with for. 5 min
  6. 6 Summary - Arrays Use single and multidimensional arrays to write a grade table. 5 min
11
Strings
6 lessons · 28 min
  1. 1 String basics Learn C strings with char arrays and the null terminator. 4 min
  2. 2 String literals Learn string literals with double quotes and escape sequences. 4 min
  3. 3 strlen Learn to get the string length with strlen. 5 min
  4. 4 strcpy and strcat Learn to copy with strcpy and concatenate with strcat. 5 min
  5. 5 strcmp Learn to compare two strings with strcmp. 5 min
  6. 6 Summary - Strings Combine strlen, strcpy and strcmp to write a name search app. 5 min
12
Functions
6 lessons · 27 min
  1. 1 Defining functions Learn how to define and call a function. 4 min
  2. 2 Return values Learn to return a value from a function with return. 4 min
  3. 3 Parameters Learn to pass parameters to a function and call by value. 4 min
  4. 4 Function prototypes Learn function prototypes (declarations) and ordering. 5 min
  5. 5 Recursion Learn recursion with a function that calls itself. 5 min
  6. 6 Summary - Functions Combine prototypes, parameters and recursion to write a factorial calculator. 5 min
13
Pointer basics
6 lessons · 30 min
  1. 1 What is a pointer? Learn that a pointer holds a memory address and is accessed with *. 5 min
  2. 2 The & address operator Learn to take a variable's address with &. 5 min
  3. 3 Pointer dereference Learn to access the value a pointer points to with *. 5 min
  4. 4 NULL Learn the NULL pointer concept and safety. 5 min
  5. 5 Pointer arithmetic Learn to do arithmetic on pointers with + and -. 5 min
  6. 6 Summary - Pointer basics Combine &, * and NULL to write a swap function. 5 min
14
Arrays and pointers
6 lessons · 30 min
  1. 1 Array name as pointer Learn that the array name is a pointer to the first element. 5 min
  2. 2 Pointer to array Learn to access array elements with pointer arithmetic. 5 min
  3. 3 Passing arrays to functions Learn to pass arrays to functions as pointers. 5 min
  4. 4 Pointer loop Learn to loop over an array with a pointer. 5 min
  5. 5 Multidim array pointer Learn to pass multidimensional arrays as pointers. 5 min
  6. 6 Summary - Arrays and pointers Combine the array-pointer relationship to write an array sum function. 5 min
15
Project: To-do CLIProject
5 lessons · 30 min
  1. 1 Task model Design the Task struct and array. 6 min
  2. 2 Adding tasks Learn to add tasks with the AddTask function. 6 min
  3. 3 Listing tasks Learn to print tasks formatted with ListTasks. 6 min
  4. 4 Completing tasks Learn to update task status with CompleteTask. 6 min
  5. 5 Putting it together Build a working CLI app with a menu loop. 6 min
16
String functions
6 lessons · 30 min
  1. 1 strchr Learn to search for a character in a string with strchr. 5 min
  2. 2 strstr Learn to search for a substring with strstr. 5 min
  3. 3 strtok Learn to split a string into tokens with strtok. 5 min
  4. 4 sprintf Learn to build formatted strings with sprintf. 5 min
  5. 5 sscanf Learn to read values from a string with sscanf. 5 min
  6. 6 Summary - String functions Combine strchr, strtok and sprintf to write a CSV parser. 5 min
17
Structs
6 lessons · 29 min
  1. 1 Defining structs Learn to define a struct that combines multiple fields. 5 min
  2. 2 Using structs Learn to declare struct variables and access fields. 4 min
  3. 3 typedef struct Learn to give a struct a new name with typedef. 5 min
  4. 4 Array of structs Learn to create an array of structs and iterate it. 5 min
  5. 5 Nested structs Learn to use a struct inside another struct. 5 min
  6. 6 Summary - Structs Combine struct, typedef and struct array to write a student database. 5 min
18
Memory and stack
6 lessons · 30 min
  1. 1 Stack and heap Learn the difference between stack and heap memory. 5 min
  2. 2 Automatic storage Learn automatic storage duration (local variables). 5 min
  3. 3 malloc Learn to allocate memory on the heap with malloc. 5 min
  4. 4 free Learn to release allocated memory with free. 5 min
  5. 5 calloc and realloc Learn memory management with calloc and realloc. 5 min
  6. 6 Summary - Memory and stack Combine malloc, free and realloc to write a dynamic array. 5 min
19
Preprocessor
6 lessons · 29 min
  1. 1 #define Learn to define constants and macros with #define. 4 min
  2. 2 #include Learn to include header files with #include. 5 min
  3. 3 Conditional compilation Learn conditional compilation with #ifdef, #ifndef and #endif. 5 min
  4. 4 Macro functions Learn to write parameterized macro functions. 5 min
  5. 5 Header files Learn to create your own header files. 5 min
  6. 6 Summary - Preprocessor Combine #define, #include and #ifdef to write a configuration header. 5 min
20
Beginner finalProject
5 lessons · 30 min
  1. 1 Project design Design the skeleton of the beginner final mini app. 6 min
  2. 2 Data model Set up the structs and arrays for the app. 6 min
  3. 3 Functions Write business rules with functions and conditional logic. 6 min
  4. 4 Memory management Add dynamic memory management with malloc and free. 6 min
  5. 5 Putting it together Combine all parts into a working final app. 6 min

Learn advanced pointers, file I/O, structures, unions, dynamic memory and multi-file projects in C.

1
Advanced pointers
6 lessons · 30 min
  1. 1 Pointer to pointer Learn the double pointer (**) concept. 5 min
  2. 2 Array of pointers Learn to create and use an array of pointers. 5 min
  3. 3 Function pointers Learn to define and call function pointers. 5 min
  4. 4 Function pointer parameter Learn to pass function pointers to functions. 5 min
  5. 5 void pointer Learn to use generic pointers with void*. 5 min
  6. 6 Summary - Advanced pointers Combine double pointer, function pointer and void* to write a sorting app. 5 min
2
Memory management
6 lessons · 30 min
  1. 1 Dynamic array Learn to create a dynamic array with malloc. 5 min
  2. 2 Resize with realloc Learn to resize an array with realloc. 5 min
  3. 3 Memory leaks Learn the memory leak concept and how to prevent it. 5 min
  4. 4 Dangling pointers Learn the dangling pointer concept and safety. 5 min
  5. 5 Allocation patterns Learn common memory allocation patterns. 5 min
  6. 6 Summary - Memory management Combine malloc, realloc and free to write a dynamic stack. 5 min
3
Project: Helper libraryProject
5 lessons · 30 min
  1. 1 Module design Design the skeleton of the helper library module. 6 min
  2. 2 String helpers Add and test string processing functions. 6 min
  3. 3 Number helpers Add number conversion and calculation functions. 6 min
  4. 4 Array helpers Add array processing functions. 6 min
  5. 5 Putting it together Combine helper functions into a library. 6 min
4
Advanced string handling
6 lessons · 30 min
  1. 1 Dynamic strings Learn to create dynamic strings with malloc. 5 min
  2. 2 String concatenation Learn to concatenate strings with strcat and sprintf. 5 min
  3. 3 String search Learn advanced search with strstr and strchr. 5 min
  4. 4 String conversion Learn conversion with atoi, atof and strtol. 5 min
  5. 5 String safety Learn safe string handling with strncpy and strncat. 5 min
  6. 6 Summary - Advanced strings Combine dynamic strings, conversion and safety to write a string buffer. 5 min
5
Function pointers
6 lessons · 30 min
  1. 1 Function pointer definition Learn function pointer syntax and types. 5 min
  2. 2 Calling function pointers Learn to call function pointers. 5 min
  3. 3 qsort Learn to sort with qsort using function pointers. 5 min
  4. 4 Callback patterns Learn callback patterns and usage. 5 min
  5. 5 Function pointer array Learn dispatch tables with function pointer arrays. 5 min
  6. 6 Summary - Function pointers Combine qsort, callback and dispatch table to write a command handler. 5 min
6
Advanced structs
6 lessons · 30 min
  1. 1 Structs and pointers Learn struct pointers and the -> operator. 5 min
  2. 2 Dynamic struct Learn to allocate memory for a struct with malloc. 5 min
  3. 3 Struct and function Learn to pass structs to functions by value and by pointer. 5 min
  4. 4 Nested structs Learn nested structs and composition. 5 min
  5. 5 Array of structs Learn arrays of structs and sorting them. 5 min
  6. 6 Summary - Advanced structs Combine struct pointer, dynamic struct and array to write a person database. 5 min
7
Unions and enums
6 lessons · 30 min
  1. 1 union Learn to share memory between types with union. 5 min
  2. 2 enum Learn to define named constants with enum. 5 min
  3. 3 Struct and union Learn to use union inside a struct. 5 min
  4. 4 typedef enum Learn to give an enum a new name with typedef. 5 min
  5. 5 Bit fields Learn memory savings with bit fields. 5 min
  6. 6 Summary - Unions and enums Combine union, enum and bit fields to write a state machine. 5 min
8
Project: Quiz appProject
5 lessons · 30 min
  1. 1 Quiz model Design the skeleton of Question and Quiz structs. 6 min
  2. 2 Adding questions Learn to add questions with the AddQuestion function. 6 min
  3. 3 Running the quiz Learn to ask questions in turn with the Run function. 6 min
  4. 4 Score calculation Learn correct count with the score calculation function. 6 min
  5. 5 Putting it together Combine the quiz functions with a console menu. 6 min
9
File I/O
6 lessons · 30 min
  1. 1 FILE and fopen Learn the FILE struct and opening files with fopen. 5 min
  2. 2 fprintf and fscanf Learn to write and read files with fprintf and fscanf. 5 min
  3. 3 fgets and fputs Learn to read and write lines with fgets and fputs. 5 min
  4. 4 fclose Learn to close files with fclose. 5 min
  5. 5 fread and fwrite Learn binary read/write with fread and fwrite. 5 min
  6. 6 Summary - File I/O Combine fopen, fprintf and fgets to write a notes app. 5 min
10
Error handling
6 lessons · 29 min
  1. 1 errno Learn error codes with errno. 4 min
  2. 2 perror Learn to print error messages with perror. 5 min
  3. 3 strerror Learn to get error messages with strerror. 5 min
  4. 4 assert Learn debug checks with assert. 5 min
  5. 5 Error return values Learn error return values from functions. 5 min
  6. 6 Summary - Error handling Combine errno, perror and assert to write a robust file reader. 5 min
11
Multi-file projects
6 lessons · 30 min
  1. 1 Headers and sources Learn the difference between .h and .c files. 5 min
  2. 2 extern Learn to share global variables with extern. 5 min
  3. 3 static Learn file-local variables and functions with static. 5 min
  4. 4 Makefile basics Learn build automation with Makefile. 5 min
  5. 5 Multiple modules Learn to combine multiple modules in one project. 5 min
  6. 6 Summary - Multi-file Combine header, extern and Makefile to write a two-module project. 5 min
12
Project: Library appProject
5 lessons · 30 min
  1. 1 Model design Design the skeleton of Book and Member structs. 6 min
  2. 2 Library module Set up collection management with the Library module. 6 min
  3. 3 Checking out Write the checkout flow with Checkout and Return functions. 6 min
  4. 4 Search and filter Write search and filtering with function pointers. 6 min
  5. 5 Putting it together Combine the library modules with a menu. 6 min
13
Dynamic data structures
6 lessons · 30 min
  1. 1 Linked list Learn to create a linked list with struct. 5 min
  2. 2 Adding to list Learn to add elements to a linked list. 5 min
  3. 3 Traversing list Learn to traverse a linked list with a loop. 5 min
  4. 4 Deleting from list Learn to delete elements from a linked list. 5 min
  5. 5 Stack and queue Learn to implement stack and queue with linked list. 5 min
  6. 6 Summary - Dynamic data Combine linked list, stack and queue to write an undo/redo system. 5 min
14
Variable arguments
6 lessons · 30 min
  1. 1 stdarg.h Learn variadic functions with stdarg.h. 5 min
  2. 2 va_start and va_end Learn the va_start, va_arg and va_end macros. 5 min
  3. 3 printf-like function Learn to write your own printf-like function. 5 min
  4. 4 vsnprintf Learn safe formatting with vsnprintf. 5 min
  5. 5 Variadic patterns Learn variadic function patterns. 5 min
  6. 6 Summary - Variable arguments Combine va_list and vsnprintf to write a logging function. 5 min
15
Standard library
6 lessons · 28 min
  1. 1 stdlib.h Learn functions like malloc, exit and atoi in stdlib.h. 4 min
  2. 2 string.h Learn string functions in string.h. 4 min
  3. 3 math.h Learn math functions in math.h. 5 min
  4. 4 time.h Learn date and time with time.h. 5 min
  5. 5 ctype.h Learn character classification with ctype.h. 5 min
  6. 6 Summary - Standard library Combine stdlib, math and time to write a timing app. 5 min
16
Command-line arguments
6 lessons · 29 min
  1. 1 argc and argv Learn command-line arguments with argc and argv. 4 min
  2. 2 Argument processing Learn to process arguments by looping over argv. 5 min
  3. 3 getopt Learn option processing with getopt. 5 min
  4. 4 Argument validation Learn to validate command-line arguments. 5 min
  5. 5 Exit codes Learn program exit codes with exit. 5 min
  6. 6 Summary - Command line Combine argc, getopt and exit to write a CLI tool. 5 min
17
Debugging
6 lessons · 30 min
  1. 1 gdb basics Learn to debug programs with gdb. 5 min
  2. 2 Breakpoints Learn to set breakpoints and step in gdb. 5 min
  3. 3 Watch and print Learn to watch and print variables in gdb. 5 min
  4. 4 valgrind Learn to find memory errors with valgrind. 5 min
  5. 5 printf debugging Learn printf debugging tactics. 5 min
  6. 6 Summary - Debugging Combine gdb and valgrind to debug a program. 5 min
18
Advanced bitwise
6 lessons · 30 min
  1. 1 Bit masking Learn flag management with bit masking. 5 min
  2. 2 Set and clear bits Learn to set and clear specific bits. 5 min
  3. 3 Bit shifting Learn bit shifting patterns with << and >>. 5 min
  4. 4 Bit hacks Learn fast bit hacks and tricks. 5 min
  5. 5 Pack and unpack Learn data compression with bit pack and unpack. 5 min
  6. 6 Summary - Advanced bitwise Combine masking, shifting and hacks to write a permission system. 5 min
19
Advanced typedef
6 lessons · 29 min
  1. 1 typedef and struct Learn to give a struct a short name with typedef. 4 min
  2. 2 typedef and function pointer Learn function pointer types with typedef. 5 min
  3. 3 typedef and array Learn to define array types with typedef. 5 min
  4. 4 Opaque types Learn opaque types and information hiding. 5 min
  5. 5 typedef and enum Learn enum types with typedef. 5 min
  6. 6 Summary - Advanced typedef Combine struct, fp and opaque types to write a module interface. 5 min
20
Intermediate finalProject
5 lessons · 30 min
  1. 1 Project design Design the skeleton of the intermediate final mini app. 6 min
  2. 2 Data model Set up the data model with structs and linked list. 6 min
  3. 3 Functional logic Write business logic with function pointers and callbacks. 6 min
  4. 4 File I/O Save and load data to/from files. 6 min
  5. 5 Putting it together Combine all parts into a working app. 6 min

Learn systems programming, POSIX, socket programming, multithreading, signal handling and memory safety in C.

1
POSIX basics
6 lessons · 30 min
  1. 1 What is POSIX? Learn the POSIX standard and its relation to C. 5 min
  2. 2 unistd.h Learn basic functions in unistd.h. 5 min
  3. 3 File descriptors Learn the file descriptor concept and management. 5 min
  4. 4 open and close Learn file management with open and close. 5 min
  5. 5 read and write Learn low-level I/O with read and write. 5 min
  6. 6 Summary - POSIX Combine open, read and write to write a file copy program. 5 min
2
Process management
6 lessons · 30 min
  1. 1 fork Learn to create processes with fork. 5 min
  2. 2 exec Learn to replace a process with the exec family. 5 min
  3. 3 wait Learn to wait for processes with wait and waitpid. 5 min
  4. 4 getpid Learn process IDs with getpid and getppid. 5 min
  5. 5 exit and _exit Learn the difference between exit and _exit. 5 min
  6. 6 Summary - Process management Combine fork, exec and wait to write a shell. 5 min
3
Signal handling
6 lessons · 30 min
  1. 1 What are signals? Learn the signal concept and basic signals. 5 min
  2. 2 Signal handler Learn to catch signals with the signal function. 5 min
  3. 3 sigaction Learn advanced signal handling with sigaction. 5 min
  4. 4 kill Learn to send signals with kill. 5 min
  5. 5 Signal safety Learn signal safety and reentrant functions. 5 min
  6. 6 Summary - Signal handling Combine sigaction, kill and safety to write a signal catcher. 5 min
4
Pthreads
6 lessons · 30 min
  1. 1 pthread_create Learn to create threads with pthread_create. 5 min
  2. 2 pthread_join Learn to wait for threads with pthread_join. 5 min
  3. 3 pthread_mutex Learn mutual exclusion with pthread_mutex. 5 min
  4. 4 pthread_cond Learn condition variables with pthread_cond. 5 min
  5. 5 Thread safety Learn thread safety and data race concepts. 5 min
  6. 6 Summary - Pthreads Combine create, mutex and cond to write a producer-consumer. 5 min
5
Socket programming
6 lessons · 30 min
  1. 1 What are sockets? Learn the socket concept and its role in network communication. 5 min
  2. 2 socket and bind Learn to set up a server with socket and bind. 5 min
  3. 3 listen and accept Learn to accept connections with listen and accept. 5 min
  4. 4 connect Learn client connections with connect. 5 min
  5. 5 send and recv Learn data exchange with send and recv. 5 min
  6. 6 Summary - Socket programming Combine socket, bind and accept to write an echo server. 5 min
6
Inter-process communication
6 lessons · 30 min
  1. 1 Pipe Learn unidirectional data flow between processes with pipe. 5 min
  2. 2 FIFO Learn named pipes with FIFO. 5 min
  3. 3 Shared memory Learn shared memory with shmget and shmat. 5 min
  4. 4 Message queue Learn message queues with msgget and msgsnd. 5 min
  5. 5 Semaphore Learn semaphores with semget and semop. 5 min
  6. 6 Summary - IPC Combine pipe, shared memory and semaphore to write an IPC app. 5 min
7
File locking
6 lessons · 30 min
  1. 1 flock Learn file locking with flock. 5 min
  2. 2 fcntl Learn advanced file locking with fcntl. 5 min
  3. 3 Lock types Learn the difference between shared and exclusive locks. 5 min
  4. 4 Deadlock Learn the deadlock concept and how to prevent it. 5 min
  5. 5 Automatic cleanup Learn automatic lock cleanup and safety. 5 min
  6. 6 Summary - File locking Combine flock and fcntl to write a lock manager. 5 min
8
Terminal I/O
6 lessons · 30 min
  1. 1 termios Learn terminal configuration with termios. 5 min
  2. 2 Raw mode Learn to put the terminal in raw mode. 5 min
  3. 3 Non-blocking input Learn to read non-blocking input. 5 min
  4. 4 ANSI escape Learn colors and cursor with ANSI escape sequences. 5 min
  5. 5 Terminal size Learn to get terminal size with ioctl. 5 min
  6. 6 Summary - Terminal I/O Combine termios and ANSI to write a terminal app. 5 min
9
Dynamic loading
6 lessons · 30 min
  1. 1 dlopen Learn to load dynamic libraries with dlopen. 5 min
  2. 2 dlsym Learn to resolve symbols with dlsym. 5 min
  3. 3 dlclose Learn to close libraries with dlclose. 5 min
  4. 4 dlerror Learn error handling with dlerror. 5 min
  5. 5 Plugin system Learn to build a plugin system with dlopen. 5 min
  6. 6 Summary - Dynamic loading Combine dlopen and dlsym to write a plugin system. 5 min
10
Cryptography basics
6 lessons · 30 min
  1. 1 Hash functions Learn hash functions and digest extraction. 5 min
  2. 2 SHA-256 Learn hashing with SHA-256. 5 min
  3. 3 HMAC Learn message authentication with HMAC. 5 min
  4. 4 AES Learn symmetric encryption with AES. 5 min
  5. 5 Random numbers Learn secure random number generation. 5 min
  6. 6 Summary - Cryptography Combine SHA-256 and HMAC to write a message authenticator. 5 min
11
Unicode and i18n
6 lessons · 30 min
  1. 1 ASCII and UTF-8 Learn the difference between ASCII and UTF-8. 5 min
  2. 2 wchar_t Learn wide characters with wchar_t. 5 min
  3. 3 setlocale Learn locale settings with setlocale. 5 min
  4. 4 Multibyte conversion Learn multibyte and wide character conversion. 5 min
  5. 5 UTF-8 handling Learn UTF-8 string handling. 5 min
  6. 6 Summary - Unicode Combine UTF-8 and wchar_t to write a multilingual hello app. 5 min
12
Testing basics
6 lessons · 30 min
  1. 1 assert testing Learn unit testing with assert. 5 min
  2. 2 Test framework Learn to write your own test framework. 5 min
  3. 3 Test doubles Learn test doubles and stubs. 5 min
  4. 4 Coverage Learn code coverage measurement. 5 min
  5. 5 Test patterns Learn common testing patterns. 5 min
  6. 6 Summary - Testing basics Combine assert and a test framework to write a calculator test. 5 min
13
Performance optimization
6 lessons · 30 min
  1. 1 Profiling Learn performance measurement with profiling tools. 5 min
  2. 2 Cache effects Learn CPU cache effects and data locality. 5 min
  3. 3 Loop optimization Learn loop optimization and unrolling. 5 min
  4. 4 inline Learn the inline keyword and macro difference. 5 min
  5. 5 Memory alignment Learn memory alignment and struct packing. 5 min
  6. 6 Summary - Performance Combine profiling, cache and loop optimization to write a copy function. 5 min
14
Advanced finalProject
5 lessons · 30 min
  1. 1 Project design Design the skeleton of the advanced final mini app. 6 min
  2. 2 Process and thread Write parallel processing with fork and pthread. 6 min
  3. 3 Socket layer Write a network communication layer with sockets. 6 min
  4. 4 IPC and sync Write IPC and synchronization with pipe and semaphore. 6 min
  5. 5 Putting it together Combine all layers into a working mini server. 6 min

Learn kernel programming, driver basics, compiler construction, security and modern C in C.

1
Kernel basics
6 lessons · 30 min
  1. 1 What is the kernel? Learn the kernel concept and user/kernel mode. 5 min
  2. 2 Syscall Learn the system call (syscall) concept. 5 min
  3. 3 ioctl Learn device control with ioctl. 5 min
  4. 4 /proc Learn the /proc filesystem. 5 min
  5. 5 dmesg and logs Learn kernel logs with dmesg. 5 min
  6. 6 Summary - Kernel basics Combine syscall and ioctl to write a system info tool. 5 min
2
Driver basics
6 lessons · 30 min
  1. 1 Module loading Learn to load modules with insmod and rmmod. 5 min
  2. 2 Module structure Learn the structure of a kernel module. 5 min
  3. 3 printk Learn kernel logging with printk. 5 min
  4. 4 Device number Learn device numbers and registration. 5 min
  5. 5 fops Learn the file_operations structure. 5 min
  6. 6 Summary - Driver basics Combine module structure and fops to write a character driver skeleton. 5 min
3
Compiler basics
6 lessons · 30 min
  1. 1 Lexer Learn to write a lexer (tokenizer). 5 min
  2. 2 Parser Learn to write a parser. 5 min
  3. 3 AST Learn to build an Abstract Syntax Tree (AST). 5 min
  4. 4 Code generation Learn the code generation phase. 5 min
  5. 5 Symbol table Learn the symbol table and its management. 5 min
  6. 6 Summary - Compiler basics Combine lexer, parser and AST to write a calculator language. 5 min
4
Security
6 lessons · 30 min
  1. 1 Buffer overflow Learn the buffer overflow vulnerability. 5 min
  2. 2 Stack canary Learn protection with stack canaries. 5 min
  3. 3 ASLR Learn address space layout randomization with ASLR. 5 min
  4. 4 Format string Learn the format string vulnerability. 5 min
  5. 5 Safe functions Learn safe alternatives like fgets instead of gets. 5 min
  6. 6 Summary - Security Combine buffer overflow, canary and ASLR to write a safe input function. 5 min
5
Modern C
6 lessons · 30 min
  1. 1 C11 and C17 Learn the C11 and C17 standards. 5 min
  2. 2 _Generic Learn generic macros with _Generic. 5 min
  3. 3 _Static_assert Learn compile-time checks with _Static_assert. 5 min
  4. 4 Atomics Learn atomic operations with stdatomic.h. 5 min
  5. 5 threads.h Learn standard threads with threads.h. 5 min
  6. 6 Summary - Modern C Combine _Generic, _Static_assert and atomics to write a type-safe macro. 5 min
6
Linker and loader
6 lessons · 30 min
  1. 1 Object files Learn the structure of object files (.o). 5 min
  2. 2 Symbol resolution Learn symbol resolution and linking. 5 min
  3. 3 Relocation Learn relocation and address patching. 5 min
  4. 4 Static and dynamic Learn the difference between static and dynamic linking. 5 min
  5. 5 ELF format Learn the ELF file format. 5 min
  6. 6 Summary - Linker Combine object files, relocation and ELF to write a symbol viewer. 5 min
7
Embedded C
6 lessons · 30 min
  1. 1 What is embedded? Learn the embedded system concept and constraints. 5 min
  2. 2 Memory-mapped I/O Learn the memory-mapped I/O concept. 5 min
  3. 3 Interrupts Learn interrupt handling. 5 min
  4. 4 Bit manipulation Learn bit manipulation patterns in embedded. 5 min
  5. 5 Hardware timing Learn hardware timing and delay patterns. 5 min
  6. 6 Summary - Embedded C Combine MMIO, interrupts and bit manipulation to write an LED blink app. 5 min
8
Expert finalProject
5 lessons · 30 min
  1. 1 Project design Design the skeleton of the expert final mini app. 6 min
  2. 2 Kernel module Write a kernel module and syscall layer. 6 min
  3. 3 Compiler component Write a small language with lexer and parser. 6 min
  4. 4 Security layer Write buffer overflow protection and security checks. 6 min
  5. 5 Putting it together Combine all expert topics into a working mini app. 6 min

Lessons are free, an account keeps your progress

You do not have to sign up. If you do, you continue where you left off and never lose your work.

  • Progress saved on every device
  • Earn XP and badges
  • Keep your daily streak
  • Get a certificate when you finish
create a free account

Frequently asked questions

Are the C lessons free?

Yes. All 362 lessons of the C course are free and you can start without an account.

Do I need any prior knowledge?

No. The beginner level starts from zero; a browser is all you need. If you already know the basics, start at a higher level.

How long does the course take?

Lessons take 2–8 minutes. The whole course is about 30 hours; with 15–20 minutes a day you can finish in a few months.

Do I get a certificate?

Yes. When you complete the course with a free account, a verifiable certificate is issued in your name.

Will I lose my progress without an account?

Without an account your progress is kept only in your current browser. When you create a free account it is moved to your account.

Next step C++

Learn C++20 from variables to OOP, templates, modern C++ and expert topics with hands-on projects.