Skip to content
Pebellslearn by building

The course

C

Learn where C fits, set up a compiler, and master variables, types, operators and control flow in modern C (C11/C17). Every lesson grows the same small program: a logger for a greenhouse sensor board.

Ready to learn

Your path through the ideas

Inside the course

7 modules · 22 lessons
CLI tools & setup · Start here

Install your tools, choose your setup and verify a local run.

02Introduction to C3 lessons

C is a compiled language that provides direct control over data representation and memory operations. See where C is used today, how it relates to the assembly beneath it, and how it differs from its descendant C++.

  1. 01Where C Runs10 min
  2. 02C vs Assembly10 min
  3. 03C vs C++10 min
03Setting Up3 lessons

A C development environment combines a source editor, compiler and linker to turn source files into an executable program. Get a working C toolchain on your machine, build and run your first program from the terminal, and set up an editor that checks your code as you type.

  1. 01Installing a C Compiler10 min
  2. 02Running Your First Program12 min
  3. 03Code Editors and IDEs10 min
04Variables3 lessons

A variable names an object that stores a value. Declarations introduce its name and type; definitions provide the object itself. Tell declarations from definitions, give every variable a starting value, and print values correctly with printf's format specifiers.

  1. 01Declaration vs Definition12 min
  2. 02Initialization12 min
  3. 03Printing Variables12 min
05Data Types5 lessons

A C data type specifies a value's representation, supported operations and conversion rules. Choose integer widths, work with floating-point numbers, treat characters and booleans as the small integers they are, predict conversions, and use qualifiers to make promises about a variable.

  1. 01Integers and Fixed-Width Types14 min
  2. 02float, double and long double12 min
  3. 03char and bool12 min
  4. 04Type Conversion14 min
  5. 05Type Qualifiers14 min
06Operators5 lessons

Operators perform computations, comparisons and other operations on one or more operands. Work confidently with arithmetic, comparison, logical, conditional and bitwise operators, and learn the precedence traps that catch everyone once.

  1. 01Arithmetic Operators12 min
  2. 02Comparison Operators10 min
  3. 03Logical Operators12 min
  4. 04The Conditional Operator10 min
  5. 05Bitwise Operators14 min
07Control Flow3 lessons

Control flow chooses which statement runs next, using conditions, repeated execution and explicit transfers such as break. Choose between if and switch, pick the right loop for the job, and steer loops with break and continue while processing the logger's readings.

  1. 01if, else and switch14 min
  2. 02for, while and do-while14 min
  3. 03break and continue14 min
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.