Programming Fundamentals Using C++

Programming Exercises

152 unique programming exercises spanning the full course, from first variables to classes. Every exercise has a unique ID (PF-E-NNN), a labeled difficulty, prerequisites, full I/O specification, hints, and the lecture it supports. Exercises train the outcomes in ../LEARNING_OUTCOMES.md; each exercise cites its outcome codes.

Organization

exercises/
├── README.md                      ← this file: bank index + policies
├── by_topic/                      ← the bank itself, 12 topic files
│   ├── T01_variables_calculations.md
│   ├── T02_conditions.md
│   ├── T03_loops.md
│   ├── T04_number_problems.md
│   ├── T05_functions.md
│   ├── T06_arrays.md
│   ├── T07_strings.md
│   ├── T08_searching_sorting.md
│   ├── T09_pointers_references.md
│   ├── T10_structures.md
│   ├── T11_file_handling.md
│   └── T12_classes_objects.md
├── data-science/                  ← BS Data Science track: PF-DS-01…18 + datasets
├── in_class/                      ← short lecture-slot drills (authored per week)
│   └── solutions/                 ← instructor-side until published after class
└── homework/                      ← weekly practice sets (authored per week)
    └── solutions/                 ← published after the related due date

The by_topic/ bank is the master collection: it is how an instructor finds practice for a specific skill. The in_class/ and homework/ directories are the delivery layer: per-week selections drawn from the bank, authored with the week batches (../docs/CONTENT_ROADMAP.md § 3).

Difficulty ladder

LevelMeaningExpectation
🟢 BeginnerOne new concept, direct applicationFinish in ~5 min
🔵 FoundationalConcept + one twist (a second input, a boundary)~10 min
🟠 IntermediateCombine 2 concepts or require design judgment~20 min
🔴 Advanced IntroductorySmall program with structure + edge cases~30–45 min

Every topic file runs the ladder in order — difficulty progression is inside each topic and across the course (topics map to the 16-module calendar, so later topics inherently carry higher floors).

Exercise record format

Every exercise is a complete record:

### PF-E-013 · Title
**Difficulty:** Intermediate · **Lecture:** L09 · **Outcomes:** PF-5.2, PF-5.3
**Prerequisites:** E-007, L05
**Problem:** …full statement…
**Input:** … / **Output:** … / **Constraints:** …
**Sample:** input → output
**Hints:** nudge 1 · nudge 2

Solution policy — IMPORTANT

Complete C++ solutions live only under instructor/exercise_solutions/ (instructor-only per ../instructor/ACCESS_CONTROL.md). Student-facing files (by_topic/, in_class/, homework/) contain the exercise records without solution code — at most graduated hints. Solutions are numbered to match exercise IDs (PF-E-013.cpp + a README explaining the reasoning).

Authoring rules

Topic banks (T01–T12)

Data-science track

Datasets for the DS exercises: dataset directory with documented defects.

Programming Fundamentals Using C++ · C++17 · 16 weeksBack to top ↑