Syllabus & Study Plan

What the C course covers, what you'll be able to do by the end, and a suggested ten-week schedule with a checkpoint each week. Install a compiler first (lesson 2) — compiling and running code yourself is the fastest way to learn.

Who this course is for

Beginners who want to understand how computers really work, students taking systems or embedded programming courses, and developers from higher-level languages who need to read or write C for operating systems, libraries, firmware or performance-critical code.

Learning outcomes

By the end of the course you will be able to:

  1. Install a C compiler, build programs from the terminal with warnings enabled, and explain preprocessing, compiling and linking.
  2. Choose appropriate integer and floating-point types, and avoid overflow, truncation and conversion bugs.
  3. Format output with printf and read input safely with fgets, sscanf and strtol.
  4. Structure programs with functions, understanding scope, lifetime and static.
  5. Work with arrays and null-terminated strings using string.h and ctype.h correctly.
  6. Use pointers confidently: addresses, pointer arithmetic, const, output parameters and function pointers.
  7. Manage dynamic memory with malloc, realloc and free, and find memory bugs with sanitizers.
  8. Model data with structs, unions, enums and linked structures, and sort and search with qsort and bsearch.
  9. Read and write text and binary files, handle errors, and accept command-line arguments.
  10. Split a program into headers and source files, build it with make, recognise undefined behaviour, and use C23 features.

Course outline

PartLessonsFocus
1. Getting Started01–05Compilers, program structure, the build process
2. Variables, Types & Operators06–15Types, constants, printf, conversions, bitwise operators, input
3. Control Flow16–20if, switch, loops, break/continue/goto
4. Functions21–25Parameters, scope and lifetime, recursion, maths
5. Arrays & Strings26–30Arrays, 2D arrays, strings, string and character functions
6. Pointers & Memory31–39Pointers, arithmetic, const, malloc/realloc/free, memory bugs, function pointers
7. Structures & Data40–46Structs, unions, enums, typedef, linked lists, sorting
8. Files & Program Structure47–53Files, arguments, errors, preprocessor, multi-file builds
9. Modern C & Wrap-up54–57Undefined behaviour, C23, debugging, final project

Ten-week study plan

Plan on four to six hours a week, including time writing your own programs.

Week 1 — Setting up and first programs

Lessons 01–07.

Checkpoint: a program that converts a number of seconds into days, hours, minutes and seconds, compiled with -Wall -Wextra and no warnings.

Week 2 — Types, formatting and input

Lessons 08–15.

Checkpoint: a unit converter that reads a value and a unit from the user with fgets and sscanf, rejects bad input, and prints a formatted table of conversions.

Week 3 — Control flow and functions

Lessons 16–25.

Checkpoint: a number-guessing game with a menu loop, input validation and a limited number of attempts, split into small functions.

Week 4 — Arrays and strings

Lessons 26–30.

Checkpoint: a text analyser that reads lines until end of input and reports the number of words, the longest word and the most common letter.

Week 5 — Pointers

Lessons 31–35.

Checkpoint: rewrite your string functions from week 4 using pointers, with const-correct parameters and output parameters for multiple results.

Week 6 — Dynamic memory

Lessons 36–39.

Checkpoint: a growable array of strings that reads any number of lines, sorts them with a function pointer, and runs cleanly under -fsanitize=address,undefined.

Week 7 — Structures and data

Lessons 40–46.

Checkpoint: a contact list stored as a linked list of structs, with add, remove, find and print-sorted operations.

Week 8 — Files and program structure

Lessons 47–53.

Checkpoint: extend the contact list to load and save a CSV file named on the command line, split it into a header, two source files and a Makefile.

Week 9 — Modern C and quality

Lessons 54–56.

Checkpoint: add an assertion-based test program for your contact list, fix everything the sanitizers report, and try compiling it as C23.

Week 10 — Final project

Lesson 57.

Final project: complete at least three of the gradebook challenges, then take the quiz and aim for 25 out of 30 or better.

Faster tracks

  • Coming from another language? Skim Parts 1–4 in a few days, then spend most of your time on Parts 6–8, where C differs most.
  • Need C for embedded work? Prioritise lessons 08 (integer types), 14 (bitwise operators), 42 (unions and bit-fields), 48 (binary data and endianness) and 54 (undefined behaviour).

Practice resources

  • Playground — a starter program to experiment with.
  • Exercises — 38 fill-in-the-blank tasks and five programming challenges.
  • Quiz — 30 questions with explanations.