Learn C Programming
Start from what a program really is, then variables, decisions and loops, on to arrays, pointers and memory.
- Lessons
- 144
- Modules out
- 18 of 18
- Parts
- 5
Who can read what
- Free · 47
- Anyone can read it, signed in or not.
- Free with an account · 59
- Free to read once you have an account.
- Pro · 38
- Included with this track or with Learn Pro.
Learn Pro
Every track, one subscription
Every track's Pro lessons and projects
৳6,999 a year
By card: $9 a month or $59 a year.
What is inside
18 modules in 5 parts, 18 of them out so far. Lessons with no mark are free to read.
Part Zero
Before you write a single line
- 1What Programming Really IsReading
- 2Why Learn C When AI Can Write CodeReading
- 3The Story of C: From a Back Room at Bell Labs to Your PhoneReading
- 4Compiler, Interpreter, and What Happens When You Press RunReading
- 5Where C Runs Today: Six Systems You Already UseReading
- 6Structured and Object Oriented: Two Ways to Organise a ProgramReading
- 7Module Test: Before You Write a Single LineModule test
- 1Your First C Program, Line by LineReading
- 2Syntax and Semantics: Two Different Kinds of WrongReading
- 3The Symbol Dictionary: Every Sign in C and What It SaysReading
- 4The Complete ASCII Table, All 128 RowsReading
- 5Comments, Whitespace and Code a Human Can ReadReading
- 6Compile and Run It Yourself: the Playground and a Local ToolchainReading
- 7Problems: First ProgramsProblems
- 8Module Test: Meet CModule test
Part One
The language, piece by piece
- 1Variables: Named Boxes in MemoryReading
- 2Integer Types, Their Ranges, and OverflowReading
- 3Floating Point: float, double, and Why 0.1 Is Not 0.1Reading
- 4char, bool, and the Types That Are Really NumbersReading
- 5sizeof and limits.h: Asking the Machine Instead of GuessingReading
- 6Problems: Variables and TypesProblems
- 7Module Test: Variables and Data TypesModule test
- 1Constants and Literals: Values With a NameReading
- 2const and volatile: Promises You Make to the CompilerReading
- 3printf: Format Specifiers, Width and PrecisionReading
- 4scanf: Reading Input Without Losing Your MindReading
- 5When Input Goes Wrong: Checking What You ReadReading
- 6Problems: Reading and PrintingProblems
- 7Module Test: Constants, Input and OutputModule test
- 1Arithmetic, Integer Division and the Modulo TrapReading
- 2Relational and Logical Operators, and Short CircuitReading
- 3Assignment Shortcuts, ++ and --Reading
- 4Bitwise Operators: Working One Bit at a TimeReading
- 5Precedence and Associativity: When to Reach for BracketsReading
- 6Type Conversion: Promotion, Casting and Silent LossReading
- 7Problems: Expressions That BiteProblems
- 8Module Test: OperatorsModule test
Part Two
Control, functions and recursion
- 1if, else if, else: Choosing a PathReading
- 2Nested Conditions and the Dangling elseFree with an accountReading
- 3switch, case and Fall ThroughFree with an accountReading
- 4The Ternary Operator, and Conditions Worth NamingFree with an accountReading
- 5Under the Hood: How a Branch Becomes a JumpProReading
- 6Problems: DecisionsFree with an accountProblems
- 7Module Test: DecisionsFree with an accountModule test
- 1while: the Idea of RepetitionReading
- 2for: Init, Condition, Update, TracedFree with an accountReading
- 3do while: the Loop That Runs at Least OnceFree with an accountReading
- 4break, continue, and the goto You Will Not UseFree with an accountReading
- 5Nested Loops, Grids and PatternsFree with an accountReading
- 6Thinking in Loops: Sums, Digits, PrimesFree with an accountReading
- 7Bug Gallery: Off by One, Infinite, and the Missing BraceProReading
- 8Problems: LoopsFree with an accountProblems
- 9Module Test: LoopsFree with an accountModule test
- 1Functions: Giving a Piece of Work a NameReading
- 2Parameters, Return Values and PrototypesFree with an accountReading
- 3Pass by Value: What a Function Really GetsFree with an accountReading
- 4Scope: Where a Name LivesFree with an accountReading
- 5Storage Classes: auto, static, extern, registerFree with an accountReading
- 6The Interview Angle: Side Effects, Pure Functions and TestabilityProReading
- 7Problems: FunctionsFree with an accountProblems
- 8Module Test: FunctionsFree with an accountModule test
- 1Recursion: a Function That Calls ItselfReading
- 2The Call Stack, Frame by FrameFree with an accountReading
- 3Recursion Patterns: Factorial, Fibonacci, DigitsFree with an accountReading
- 4Recursion or a Loop: Choosing HonestlyFree with an accountReading
- 5Under the Hood: Stack Frames, Tail Calls and Stack OverflowProReading
- 6Problems: RecursionFree with an accountProblems
- 7Module Test: RecursionFree with an accountModule test
Part Three
Memory and data
- 1Arrays: Many Boxes, One NameReading
- 2Traversal Patterns: Sum, Maximum, CountFree with an accountReading
- 3Searching and Frequency CountingFree with an accountReading
- 4Two Dimensional Arrays and the GridFree with an accountReading
- 5Passing an Array to a FunctionFree with an accountReading
- 6Bug Gallery: Out of Bounds and the Silent WriteProReading
- 7Problems: ArraysFree with an accountProblems
- 8Project: A Marks Report From Raw NumbersProReading
- 9Module Test: ArraysFree with an accountModule test
- 1Characters, ASCII and the char Type in PracticeReading
- 2Strings: an Array That Ends in a ZeroFree with an accountReading
- 3Reading Strings Safely: fgets, and Why gets Was RemovedFree with an accountReading
- 4string.h: strlen, strcpy, strcmp, strcatFree with an accountReading
- 5String Problems: Palindromes, Words, CaseFree with an accountReading
- 6Under the Hood: Where a String Literal Actually LivesProReading
- 7Problems: StringsFree with an accountProblems
- 8Project: A Word Counter That Handles Real TextProReading
- 9Module Test: StringsFree with an accountModule test
- 1Memory and Addresses: Every Box Has a NumberReading
- 2Pointers: a Variable That Holds an AddressFree with an accountReading
- 3Pointers and Arrays: the Same Thing, AlmostFree with an accountReading
- 4Pass by Reference: Letting a Function Change Your VariableFree with an accountReading
- 5Pointer Arithmetic, and const in Three PlacesFree with an accountReading
- 6Function Pointers: Passing Behaviour AroundProReading
- 7Bug Gallery: NULL, Dangling and the Wild PointerProReading
- 8Problems: PointersFree with an accountProblems
- 9Project: Swap, Sort and Search With Pointers OnlyProReading
- 10Module Test: PointersFree with an accountModule test
- 1struct: Grouping Fields That Belong TogetherReading
- 2Arrays of Structs, and Structs in FunctionsFree with an accountReading
- 3Pointers to Structs and the Arrow OperatorFree with an accountReading
- 4typedef, Nested Structs and Organising a ProgramFree with an accountReading
- 5union and enum: When Each One FitsFree with an accountReading
- 6Under the Hood: Padding, Alignment and sizeof SurprisesProReading
- 7Problems: StructuresFree with an accountProblems
- 8Project: A Library Catalogue in MemoryProReading
- 9Module Test: StructuresFree with an accountModule test
- 1Files: Making Data Outlive the ProgramReading
- 2Reading and Writing Text FilesFree with an accountReading
- 3fprintf, fscanf and Formatted File Input and OutputFree with an accountReading
- 4Binary Files, fread and fwriteFree with an accountReading
- 5EOF, Errors, and Closing What You OpenedFree with an accountReading
- 6The Interview Angle: Buffering, Flushing and the Output That VanishedProReading
- 7Problems: FilesFree with an accountProblems
- 8Project: A Log File Reader That ReportsProReading
- 9Module Test: FilesFree with an accountModule test
- 1Why Dynamic Memory: Sizes You Do Not Know YetReading
- 2malloc, calloc, realloc and freeFree with an accountReading
- 3Growing an Array While the Program RunsFree with an accountReading
- 4Structs on the Heap, and a Linked List to FinishFree with an accountReading
- 5Leaks, Double Free, and the Tools That Find ThemFree with an accountReading
- 6Under the Hood: What malloc Actually Asks the Operating SystemProReading
- 7Problems: Dynamic MemoryFree with an accountProblems
- 8Project: A Contact List That Grows on DemandProReading
- 9Module Test: Dynamic MemoryFree with an accountModule test
Part Four
C in the real world
- 1The Preprocessor: What Happens Before the CompilerProReading
- 2Macros: define, Function Macros and Their TrapsProReading
- 3Header Files: Declarations, Guards and What Belongs WhereProReading
- 4Multi File Builds: Compiling, Linking and a First MakefileProReading
- 5Static and Shared Libraries, and Linking Someone Else's CodeProReading
- 6Problems: Building a Program From PartsProProblems
- 7Project: Split One File Into a Real ProjectProReading
- 8Module Test: The Preprocessor and BuildsProModule test
- 1Undefined Behaviour: the Rules You Did Not Know You Were BreakingProReading
- 2Debugging: printf, gdb, Sanitizers and a MethodProReading
- 3Reading Real C: a Walk Through Code From SQLiteProReading
- 4C99 to C23: What Changed, and What You Can Use TodayProReading
- 5Style, Warnings and Writing C That Others TrustProReading
- 6Problems: Find the BugProProblems
- 7Project: Repair a Program That Only Looks CorrectProReading
- 8Module Test: Real World CProModule test
- 1How to Work Like an Engineer: Plan, Build, Test, RepeatProReading
- 2Where to Go After CProReading
- 3Project One: A Text Statistics ToolProReading
- 4Project Two: A Contact Book That Saves to a FileProReading
- 5Project Three: A Tiny Expression InterpreterProReading
Learn Pro
Every track, one subscription
Every track's Pro lessons and projects
৳6,999 a year
By card: $9 a month or $59 a year.
Certificates
How certificates work
A certificate is not issued for finishing the lessons. It is issued on a Skill Test.
The Skill Test is open. Your first attempt on each track is free and gives you a score and a band you can share. The Skill Certificate is the paid step: it is issued on a score of 600 or more, and buying it first gives you the attempts to earn it.
Timed, in the browser
Questions are drawn at random from a large pool, and the clock runs from the first one.
Your code, hidden tests
Your code runs against tests you cannot see, and submissions are compared for similarity afterwards.
A score, not a tick
The score, 0 to 1000, is printed on the certificate with the band it falls in.
Not proctored, and it says so. Identity is the account and the name on the certificate. There is no webcam and no ID check, and the certificate and its verify page both state that.
Score bands
Score is 0 to 1000, across three sections: concepts, read and debug, build.
- Not yetRetake0–399
- FoundationRetake400–599
- WorkingCertificate issued600–749
- ProficientCertificate issued750–899
- AdvancedCertificate issued900–1000
For employers
Hiring someone?
Every certificate has a public page carrying the score, the three sections, the date and the test version. Ask for the link, not a screenshot.
- Name
- Track
- Learn C Programming
- Score
- / 1000, with its band
- Sections
- Concepts · Read and debug · Build
- Date, version