Learn C
five minutes at a time.
C shows you how computers really work: memory, pointers and speed, with nothing hidden. It runs operating systems, embedded devices and the engines inside other languages.
Start the C course free60 lessons · about 11 hours · beginner friendly
Your first program
#include <stdio.h>
int main(void) {
printf("Hello, Pebble!\n");
return 0;
}Output
Hello, Pebble!The Codiqo C course starts at printf() and builds up to arrays, strings, pointers, structs and memory you manage yourself. Every example was compiled with warnings treated as errors and run with undefined-behaviour checks.
How the C lessons work
Learn in small steps
Each lesson explains one idea with worked examples, then asks you about it straight away. About five minutes each.
Write real code
Predict the output, fix the bug, fill the gap and build programs line by line. Every lesson ends with a short program you write yourself, and we run it for real.
Keep it going
Earn XP, open chests, climb weekly leagues and keep your streak alive, with Pebble the penguin cheering you on and Terry the mentor giving hints.
The full C curriculum
Foundations
Programs, variables, types, input and operators.
First Steps: Write, compile and run your first C programs.
- Hello, C: Write main(), print with printf() and understand compiling
- Variables and int: Declare, assign and print whole numbers with %d
- Arithmetic and Integer Division: Calculate with + - * / % and predict integer results
- Format Specifiers and Comments: Print numbers, characters and text with %d %f %c %s
Types and Input: Choose the right type and read values from the user.
- Numeric Types: Use int, double and char and know their limits
- Reading Input with scanf: Read numbers and words from the keyboard safely
- Constants: Name fixed values with const and #define
- Project: Unit Converter: Convert between units with input and formatted output
Logic and Operators: Make true or false decisions and update values.
- Comparisons and Booleans: Compare values and use bool from stdbool.h
- Logical Operators: Combine conditions with && || and !
- Updating and Casting: Use ++, += and casts between int and double
- Project: Leap Year Checker: Decide leap years from several rules
Control Flow
Decisions, loops and functions.
Making Decisions: Run different code depending on conditions.
- if and else: Run code only when a condition is true
- else if and Nesting: Choose between several paths
- switch: Choose between many exact values
- Project: Grade Calculator: Turn scores into grades
Loops: Repeat work with while, do-while and for.
- while and do-while: Repeat while a condition is true
- for Loops: Count with for and nest loops
- break and continue: Leave loops early and skip iterations
- Project: Number Guessing: Loop until the right answer is found
Functions: Split programs into reusable pieces.
- Defining Functions: Write and call your own functions
- Parameters and Return Values: Pass values in and get results out
- Scope and Prototypes: Understand local variables and declare functions before use
- Project: Temperature Table: Print a formatted conversion table with functions
Memory and Data
Arrays, strings and pointers.
Arrays: Store many values of the same type.
- Declaring and Indexing Arrays: Create arrays and read and change items
- Looping over Arrays: Total, search and find the largest item
- Arrays and Functions: Pass arrays and their sizes to functions
- Project: Score Statistics: Summarise a list of scores
Strings: Work with text as arrays of characters.
- Characters and the Null Terminator: Understand char arrays and the terminating zero
- String Functions: Use strlen, strcpy, strcat and strcmp
- Building Strings Safely: Use fgets, snprintf and character tests
- Project: Palindrome Checker: Check words and phrases read from input
Pointers: Work directly with memory addresses.
- Addresses and Pointers: Use & and * to read and write through pointers
- Pointers and Functions: Change a caller's variables through pointers
- Pointer Arithmetic: Walk through arrays with pointers
- Project: Reverse in Place: Reverse an array using two pointers
Building Programs
Structs, dynamic memory, files and a complete project.
Structs: Group related data into your own types.
- Defining Structs: Create struct types and access members
- Arrays of Structs: Store and search many records
- typedef and Struct Pointers: Name types and use -> through pointers
- Project: Contact Book: Manage a list of contacts
Dynamic Memory: Allocate memory while the program runs.
- malloc and free: Request memory and give it back
- Growing Arrays with realloc: Build arrays that grow as needed
- Avoiding Memory Bugs: Prevent leaks, dangling pointers and NULL crashes
- Project: Dynamic List: Build a list that grows as items are added
Capstone Project: Plan and build a complete C program.
- Planning and Modelling: Turn an idea into structs and functions
- Core Logic: Implement the main features
- Files and Errors: Save data to a file and handle failures
- Polishing: Improve output, structure and readability
Questions about the C course
Is the C course free?
Yes. All 60 C lessons, practice sessions, leagues and achievements are free. Codiqo Plus is optional and adds unlimited Compile Fuel.
Is it good for complete beginners?
Yes. It starts from your very first line of C and explains every idea before asking you about it. If you already know some C, a quick check lets you skip ahead.
How long does it take?
About 11 hours in all: 60 lessons of roughly five to ten minutes, in 4 chapters of 3 units. Most learners do a lesson or two a day.
Do I need to install anything?
No. Codiqo works in your browser and on iPhone and Android. The programs you write run on our servers in a locked-down sandbox, so there's nothing to set up.
What will I build?
Every lesson ends with a short program you write yourself, and the course finishes with "Capstone Project": Plan and build a complete C program.
Other courses
Learn Python · Learn JavaScript · Learn C++ · Learn Java · Learn C#