C++ Foundations

The language toolkit module · ~6–8 h of study + practice · ← Course home

What this module is

The Problem-Solving module taught you to think; this one teaches the words. Every concept a beginner needs before control flow:

Every concept follows the same four beats: plain-language explanation → syntax → worked example → explanation of the example → practice pointer.

Try-first protocol (same as always)

The practice sets below include full answers — attempt, write, compile before opening them. The rule and why: Try It Yourself.

The module map

# Lesson Covers
1 A Program’s Shape program structure · main() · statements · comments
2 Data: Variables & Types variables · identifiers · naming · integer types · floating-point types · characters · booleans · introductory strings · constants · literals · declaration · initialization · assignment
3 Operations arithmetic · relational · logical · increment/decrement · compound assignment · operator precedence
4 Type Conversion & Mistakes implicit conversion · explicit casting · common data-type mistakes
Practice Items Format
Exercises 24 concept → predict → code, graded
Output predictions 10 read code, write output, then check
Debugging 10 find & fix seeded bugs, hint-laddered
Challenges 10 ★–★★★ open problems, no solutions
Lab 1 scenario + 4 variations marks/grade calculator you must actually solve
Quiz 12 questions self-check · answers kept separate

Suggested rhythm (alongside How to Study): one lesson per day, its concept-practice the same day; predictions + debugging on day 5; lab over days 6–7; quiz last.

Prerequisites and what’s next

You need: a working toolchain (Getting Started) and the problem-solving habits (IPO, trace tables). This module condenses and extends what the syllabus spreads across Unit 01 and Unit 02 — study it alongside those units, not instead of their labs and quizzes. After this module, Unit 04 (decisions) and Unit 05 (loops) build directly on the operators and types you now own.


← Course home · Lesson 1 — A Program’s Shape