Trace table

A trace table is a technique used to test algorithms in order to make sure that no logical errors occur while the calculations are being processed.

The table usually takes the form of a multi-column, multi-row table; With each column showing a variable, and each row showing each number input into the algorithm and the subsequent values of the variables.

Trace tables are typically used in schools and colleges when teaching students how to program.

They can be an essential tool in teaching students how certain calculations work and the systematic process that is occurring when an algorithm is executed.

When i reaches the value of 11 because of the i++ statement in the for definition, the comparison i <= 10 evaluates to false, thus halting the loop.