All modules

Beginner -- Module 01

C Basics

Set up a mental model for how C programs are built: the compilation pipeline, variables and data types, operators, and the printf/scanf family for talking to the terminal.

Video lesson

Downloadable notes

Plain-text lecture notes for C Basics.

Download notes (.txt)

Practice problems

Temperature converter

Read a Fahrenheit value with scanf and print the Celsius equivalent to one decimal place.

Warm-up

Integer overflow probe

Declare a short and an int, assign 40000 to both, and explain the printed difference.

Core

Swap without a third variable

Swap two integers using arithmetic (no temp variable, no pointers yet).

Stretch
Try these in the playground →

Module quiz

1. Which header declares printf and scanf?

2. What does %.2f print for the value 3.14159?

3. sizeof(char) is guaranteed to be:

4. Which is the correct entry point signature for a hosted C program?