Programming Fundamentals Using C++

Final review guide

Exam format: 180 minutes · 100 marks. Modules 9–16 carry ≥ 60 %. Shapes: MCQ, tracing, debugging, short conceptual, complexity intuition, algorithm design, coding, code completion, one extended synthesis choice. Closed book — hand-write your practice.

Emphasis map (Modules 9–16)

ModuleMust-have skillsPractice from
M9 · 1-D arraysbounds discipline, max/min from a[0], reversal, frequency tablesQuiz 09, exercises T06
M10 · 2-D arraysrow-major order, diagonals, border predicate, transposeQuiz 10, examples/grid_basics.cpp
M11 · Stringsgetline vs >>, npos, char classes, whole-word rulesQuiz 11, exercises T07
M12 · Search & sortbinary search invariants, insertion/selection traces, stabilityQuiz 12, exercises T08
M13 · Pointersaddress-of/dereference, element arithmetic, use-after-delete guardsQuiz 13, examples/pointer_basics.cpp
M14 · Dynamic memory & structsnew[]/delete[] pairing, leak paths, record copies, vector defaultQuiz 14, exercises T10
M15 · Files & errorsopen-check, getline+istringstream, skip-and-report, exit codesQuiz 15, exercises T11
M16 · OOPprivate state, invariants, guarded mutators, const methods, has-aQuiz 16, examples/first_class.cpp

Complexity facts to memorize

Trace drills

  1. a[5]{} filled a[i] = i*i — a[1] + a[4]?
  2. Selection sort pass 0 on {5,2,9,1} — the row?
  3. *p = *p + 5; p = nullptr; cout << x; — prints?
  4. P a{3}; P b{a}; b.x = 9; — a.x?

i <= n on an array · corner double-count in borders · getline after >> · binary-search bound mixing · use-after-delete · early return past delete[] · unsanitized member write breaking an invariant.

Coding practice set

  1. Second-largest distinct or N/A (n ≤ 100).
  2. Vowel/consonant/digit counts of a full line.
  3. Insertion sort with per-pass printing.
  4. Counter class with guarded dec() returning bool.

The synthesis question

Expect a choose-one extended item: extra coding items, or a scaled practical variant (extend a class or loader, design + code + your own test table). Practice writing a test table with expected outputs — it is graded work.

Exam technique

See ../midterm/review_guide.md for Weeks 1–8 foundations.

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