A for Loop with No Body
#include <stdio.h> int main() /* w w w . ja v a 2s . c o m*/ { int x; for(x=0;x<10;x=x+1,printf("%d\n",x)) ; return(0); }
In the example, the semicolon is placed on the line after the for statement.
Two items are placed in the for statement's parentheses, both separated by a comma.