Problems : Let m and n are int type, then the for loop, ()
The include # <stdio.h>
int main ()
{
int m, n-;
for (m = 0, n-= -1; n-= 0; m ++, n-++) // for (variable initial value; loop judgment condition ; variable calculated) 0 to false, zero is to true
{
n-++;
the printf ( "% D", n-);
}
return 0;
}
loop never be executed;
Experimental : when n = 0, the compiler does not display any number; when n = 1, by the compiler, the results show unlimited .... 222; and when n = -1, compiler, operating results unlimited 0000
Analysis : Analyzing the condition n = 0, whenever, n-have the value 0, and the return value of the assignment expression i.e. the assignment itself, i.e., 0, is thus considered to be false, and therefore, for loop statement never It is executed.