% used in this way, is the modulus (aka "mod") operator. It ignores the normal answer you'd get from a division, and only keeps the remainder.

So 5 % 5 equals 0, since there is no remainder left over, after you divide 5/5.

mod operator is used a lot to handle things like columns, on the display. Here, it prints a newline (causing a carriage return and line feed), on the console, every fifth column.

Tip: 0 / 5 equals 0, so if you want 5 columns in the first row, and you have i starting with zero, (instead of the one in your book), you need to use:

Code:

if(column % 5 == 0 && column)
printf("\n");

The "&& column" part means that when column is zero, the expression will still evaluate as false, and a newline will not be printed.