Arrays — Many Values, One Name

← Course home · ← Functions module · Unit 09/16 · Syllabus

Every wall the last two units asked you to name comes down here: the statistics session that couldn’t re-list its numbers, the five-m1..m5 parameter signature, the tie list that needed “Stage D’s arrays”. This unit removes the wall. One name, many boxes, and the loops you already own become the natural way to work through all of them.

In this module you will learn

Module map

Page What’s inside
Lesson 1 — The row of boxes Concept, declaration, initialization, indexing, traversal, bounds, updating, the errors gallery
Lesson 2 — The classic passes Linear search, min/max champions, sum/average, frequency counting, copying
Lesson 3 — Arrays and functions Array parameters, const, size-passing conventions, partial fills
Lesson 4 — Two dimensions Multidimensional arrays, matrices, nested loops, row/column operations
Exercises 32 exercises with separated solutions (S1–S32)
Debugging 10 seeded array bugs
Predictions 10 trace/output problems, answers separated
Challenges 15 challenges with separated solutions
Labs 7 analysis labs, each with solution + explanation
Mini-project The Marks Analyzer — the syllabus’s Unit 09 capstone

Try it yourself first

Same rule as always: attempt 15 minutes before opening any solution. Arrays add one new ritual to the pre-code routine — draw the boxes first. A five-element array drawn on paper, with indices and values, turns most off-by-one and bounds bugs into things you can see before compiling.

Pacing

Unit 09 spans one week (2 sessions):

The 7 labs are deliberately parallel in shape — pick by interest; every one practises the same passes.

What comes next

The Algorithms module takes your linear search and selection instincts and makes them fast and ordered: searching and sorting. The Marks Analyzer here becomes Marks Analyzer Plus there — and the Project 2 brief in that module is the destination both modules drive toward.

Checklist