Lessons
Lessons
C is the language behind operating systems, microcontrollers and many other programming languages. With it, you will see how a computer works with memory.
Lessons
Lesson 1
Write your first program: print text and numbers with printf and %d, and fix compiler errors.
Worth 95 XP
Lesson 2
Keep values in int, double and char variables, calculate, and divide whole numbers with / and %.
Worth 180 XP
Lesson 3
Make your program decide with if, else if, else and switch, and join conditions with && and ||.
Worth 135 XP
Checkpoint
Work out how long a car was parked, what it pays, and the change the pay machine gives back.
Worth 30 XP
Output
Parked: 2 h 25 minStarted hours: 3Fee: 6 EURPaid: 20 EURChange: 14 EUR5 EUR notes: 22 EUR coins: 21 EUR coins: 0
Lesson 5
Repeat code with while, for and do-while, add up and count in loops, and stop early with break.
Worth 120 XP
Lesson 6
Store values in an array, loop over it with for, and find the sum, average and largest value.
Worth 165 XP
Checkpoint
Sum up a week of lemonade sales: cups sold, the best day, and when you can afford your skates.
Worth 25 XP
Output
Cups sold: 122Average: 17.4 cups a dayBest day: day 5 (30 cups)Earned: 244 EURGoal reached on day 5Best days: day 3 to day 5 (64 cups)
Lesson 8
Store text in char arrays, go through its characters, and use strlen, strcpy and strcmp.
Worth 100 XP
Lesson 9
Write your own functions with parameters and return values, and use sqrt and pow from math.h.
Worth 140 XP
Checkpoint
Encrypt and decrypt messages with a Caesar cipher, then crack one without knowing the shift.
Worth 20 XP
Output
Message: Meet me at the zoo by sixSecret: Phhw ph dw wkh crr eb vlaReply: Ok, I will bring the mapMost common letter: lShift: 7Decrypted: the treasure is buried under the old tree
Lesson 11
Use pointers with & and * so functions can change your variables, and check for NULL.
Worth 160 XP
Lesson 12
Group related values into a struct, name it with typedef, and change it in functions.
Worth 100 XP
Lesson 13
Build a program that prints a class's term results: averages, grades and the best student.
Worth 85 XP
Output
Max is not in the class.MATH RESULTSAdam 42 38 45 41.7 BEmma 36 33 38 35.7 CFinn 50 50 50 50.0 AJack 17 25 20 20.7 DLucy 35 40 41 38.7 BMia 40 44 47 43.7 BBest: Finn (average 50.0)Class average: 38.4
C is the language behind operating systems, microcontrollers and many other programming languages, and it shows you how a computer really works with memory. The course goes from printf and variables through conditions, loops, arrays and strings to functions, pointers and structures.
Your programs are compiled and run right in the browser, with real compiler error messages. Between lessons, you write programs for a parking garage, a lemonade stand and secret messages, and in the final project the results of a class for the whole term.