for Loop

// prototype
// for (expr1; expr2; expr3) { statement; }

Before executing, a for loop is initialized with a set of three expressions:

int i;
for (i = 0; i < 5; i++)
{
     // statements ...
     // this loop will cycle i as 0, 1, 2, 3, and 4
}




 author: Ryan Hunt, editors: Charles Feduke, Mistress, contributor: Ken Cotterill