Trace Tables Flashcards

All 5 cards in this deck

What is a trace table?

A table containing all the variables in a program with their values recorded at each step of execution.

What is a dry run?

A manual test of a program on paper, using a trace table to follow the execution step by step.

In a trace table, what do the rows and the columns represent?

Each row is one instruction (or pass) and each column is one variable, plus a column for the output.

In a trace table for an algorithm containing a loop, what is recorded for each pass of the loop?

A new row giving the variable values after that pass, including the loop counter and the result of the condition.

True or false? A trace table is used to find syntax errors in a program.

False. It locates logic errors by showing where actual variable values differ from the expected values.