Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

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 learn6 sections · 22 lessons
Start learning

Course curriculum

Introduction to C3 lessons

See where C is used today, how it relates to the assembly beneath it, and how it differs from its descendant C++.

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

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. Installing a C Compiler10 min
  2. Running Your First Program12 min
  3. Code Editors and IDEs10 min
Variables3 lessons

Tell declarations from definitions, give every variable a starting value, and print values correctly with printf's format specifiers.

  1. Declaration vs Definition12 min
  2. Initialization12 min
  3. Printing Variables12 min
Data Types5 lessons

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. Integers and Fixed-Width Types14 min
  2. float, double and long double12 min
  3. char and bool12 min
  4. Type Conversion14 min
  5. Type Qualifiers14 min
Operators5 lessons

Work confidently with arithmetic, comparison, logical, conditional and bitwise operators, and learn the precedence traps that catch everyone once.

  1. Arithmetic Operators12 min
  2. Comparison Operators10 min
  3. Logical Operators12 min
  4. The Conditional Operator10 min
  5. Bitwise Operators14 min
Control Flow3 lessons

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. if, else and switch14 min
  2. for, while and do-while14 min
  3. break and continue14 min