PseudoStudio
Guide 10 • Cambridge Exam Essential

Trace Tables & Dry-Running

Learn how to dry-run pseudocode line-by-line, track variable states, and fill Cambridge IGCSE & A-Level exam trace tables with 100% accuracy.

⚡ Quick Summary: Exam Rules for Trace Tables

Ready to practice trace tables online?

Build your custom trace table practice test with automated instant answer grading!

START TRACE TABLE PRACTICE →

Table of Contents

1. What is a Trace Table?

A Trace Table (also called a dry-run table) is a structured matrix used to track the values of variables as an algorithm executes line by line.

In Cambridge IGCSE Computer Science (0478/0984) Paper 2 and A-Level (9618) Paper 2 & 4, trace tables account for up to 15–20% of your total exam mark. Examiners use trace tables to test whether you truly understand loop boundaries, logic conditions, and variable state updates.

2. Official Cambridge Column Rules

When completing a trace table in exam conditions, follow these strict rules:

1. Scalar Variables Column

Every scalar variable declared or modified (e.g., Count, Total, Flag) receives its own dedicated column in order of declaration.

2. Array Index Columns

If an array is declared, every index must have its own separate column header: List[1], List[2], List[3]. Cambridge pseudocode arrays are 1-indexed!

3. The OUTPUT Column

The final rightmost column is ALWAYS labeled OUTPUT. Whenever the code executes OUTPUT ..., record the exact text or number printed.

3. Step-by-Step Worked Example

Consider the following pseudocode script that calculates the sum of even numbers from 1 to 4:

DECLARE Count : INTEGER
DECLARE Sum : INTEGER
Sum ← 0
FOR Count ← 1 TO 4
    IF Count MOD 2 = 0 THEN
        Sum ← Sum + Count
    ENDIF
NEXT Count
OUTPUT "Final Sum is: ", Sum

Here is the exact Cambridge Trace Table for this script:

Count Sum OUTPUT
- 0
1
2 2
3
4 6
- - Final Sum is: 6

4. Tracing 1D and 2D Arrays

When tracing an array algorithm (like a Bubble Sort or Linear Search), each element must be recorded in its respective column when modified.

DECLARE Scores : ARRAY[1:3] OF INTEGER
Scores[1] ← 15
Scores[2] ← 25
Scores[3] ← Scores[1] + Scores[2]
OUTPUT Scores[3]
Scores[1] Scores[2] Scores[3] OUTPUT
15
25
40
40

5. Common Exam Pitfalls & Mistakes

6. Interactive Trace Table Practice

Ready to test your trace table skills? Use our dedicated Trace Table Practice environment to dry-run exam pseudocode with instant answer checking!

Practice Trace Tables Now

Solve exam-style trace tables, fill matrix values row-by-row, and get real-time feedback with solution explanations.

📊 Start Trace Table Practice ➔ 💻 General Practice Exercises ➔

Previous Topic

⬅ Guide 9: File Handling

Ready to Test Your Skills?

Practice All Topics ➔