CS U111 · Lab evaluations · Practice ladder

The lab-eval ladder: from a blank file to a real evaluation

Seven stages, each climbing from warm-up to the level of the instructor's real lab evaluations, plus the real evaluations themselves. Every problem is marked the way VPL marks it: five test cases, silent input, exact output. You choose where to start; the page suggests an order.

Start here — the facts about what you're preparing for

How every stage is built

Each stage has four rungs. The suggested climb is A → A+ → B, then the real problems for that topic. C is optional.

RungWhat it isTime eachProgram size
AWarm-up: one idea, and a first program that compiles5–10 min3–8 lines
A+Input patterns: the exact ways evaluations feed input: values on one line · N then N values · T test cases · a given function prototype. Tiny problems whose only job is getting the input shape right.5–10 min5–10 lines
B VPLVPL level: new problems built like the instructor's evaluations, with five edge-case tests each15–20 min5–15 lines
CBeyond the eval (optional): longer, lab-sheet-plus-twist programs (menus, patterns, simulations). Good practice for the end-semester lab exam, but longer than any evaluation seen so far.25–40 min25–40 lines

Inside each card, open the folded boxes in order and only when you're stuck: Stuck? First move (just the opening: what to read, which variables, what the loop runs over), then Plan in plain words, then the Full solution (compiled with clang -Wall -Wextra, no warnings, and passes all five tests). Open the solution only after your version passes, or after twice the time box.

Self-marking: the five tests

Every card has five test cases. Test 1 is the sample, and the others are the edge cases a real evaluation would try. You can check your program in two ways:

The stages

Stage 0 · before everything

Syntax bootcamp + how VPL runs your program

The skeleton from memory, the compile-run loop, printf/scanf formats, integer vs real division, a decoder for the 12 most common compiler errors, fix-it drills (including "the prompt that fails every test"), then arithmetic programs in VPL format.

Stage 1 · Lab 4 · real evals: if/else, loops

Decisions and loops

Rule-priority if/else problems, "print every reason that applies", then one loop over N inputs: counters, totals, streaks, invalid values skipped. This is where 20 of the 28 real evaluations sit.

Stage 2 · Labs 5A, 5B · real evals: functions

Functions

The function-evaluation format: a given prototype, the body, and a T-loop in main. Predict-the-output on pass-by-value and scope. Rung B is modelled on the six real function evaluations.

Stage 3 · Lab 6

Arrays, 1D and 2D

Read N values into an array, then a second pass: above the average, values that appear once, column sums. The format matches the real evaluations; the difficulty is our estimate.

Stage 4 · Lab 7

Strings

Reading input safely first (a number followed by a line is the classic VPL trap), then character counts, checks and transformations at evaluation size.

Stage 5 · Lab 8

Recursion

Recursive functions in the function-evaluation format: a given prototype, "no loops", and base-case tests. Hand traces with call-stack tables.

The real thing · 22 problems

Real lab evals (instructor bank)

The instructor's evaluations, quoted word for word with their five test cases: 9 if/else, 9 loop and 4 function problems, ordered from easy to hard, with folded hints and solutions.

Stage 6 · timed

Mock lab evaluations

Mocks 1–3 are six real evaluations held back so you meet them cold (if/else, loops, functions; 45 min each). Mocks 4–6 cover arrays, strings and an integrated problem in the same format. Plus the first-five-minutes routine.

Choose your route

You decide what to work on. These are suggestions for common situations. Within any stage the climb is the same: A → A+ → B → the real problems for that topic. Skip a rung whenever its first problem feels easy.

Your situationSuggested route
Not sure where you stand (15 min)Try one real problem cold: the first loop problem on the bank page, 15 minutes, no hints. If it passes all five tests, start at Rung B of the stage you need. If you couldn't start, begin at Rung A+. If it compiled but failed tests, read its trap box, then do Rung B.
An evaluation could come this week (~2 h)Stage 0's "how VPL runs your program" section and its two VPL fix-its (20 min). Then the A+ rung of the current lab's stage, then two of its Rung B problems. Last, skim the lab-eval routine.
About a week (~1½–2 h a day)Day 1: Stage 0 VPL section + Stage 1 A+ and B. Day 2: the bank's if/else and loop problems (do half, timed). Day 3: Stage 2 A+ and B, then the bank's function problems. Days 4–6: A+ and B of the current lab's stage (arrays, strings or recursion). Day 7: Mocks 1–3, one per sitting. Skip Rung C.
Two weeks or moreThe whole ladder in order, Rung C included, with the bank problems after each matching stage and the mocks at the end. Then redo every problem you marked "needed the solution".

The daily routine (inside any route): spend 10 minutes retyping yesterday's hardest problem from a blank file, without looking, until it passes all five tests. Then 40–90 minutes of new problems, timed. Finish with 5 minutes adding today's mistakes to a running list ("forgot N = 0", "printed a label"). The retype is what turns "I followed it" into "I can write it".

Classic trap: reading instead of typing

Reading a solution and nodding feels like progress, but it trains recognition, and a lab evaluation tests recall from a blank file. If you opened the full solution, the problem doesn't count as done. Mark it and retype it from scratch the next day.

What's already on the site, and where it fits

Practising with an AI? Ask it well

"Here is a C lab-evaluation problem: [paste]. My program fails test [n]: input [paste], expected [paste], mine printed [paste]. Don't rewrite my program. Tell me which input case my logic mishandles, in one sentence."

"Give me one new problem in the same format as this VPL problem: [paste one from the bank]. Silent input, an exact output format, and five test cases including N = 0 or a boundary value. Don't give the solution."

Run anything an AI says a program prints. Its test cases can be wrong, so check them yourself.