; which is rarely used but causes problems for new
C programmers. For example, the following code compiles and executes, but
does not produce the desired effect
/* an unintentional null statement */
while (i < 0);
{
printf ("The value of i is %d\n", i);
i--;
}
Block
{ S1 S2 S3 ... Sn }
where the Si are statements enclosed with braces
Control Statement
an if, for, while, ...
So that's the rule for semicolons!
In C, the semicolon is used to terminate a simple statement