For and while loops (and if statements) can have the squigly brackets omitted if they only have a single statement inside. If that statement is a printf statement, the fprintf statement will be added directly below it as it should, but no squigly brackets will be inserted so the fprintf would only execute once (or would always execute in an if statement).
EXAMPLE:
for(i=0;i<10;i++) printf("Hey!");
YIELDS:
for(i=0;i<10;i++) printf("Hey!");
fprintf(outfile, "Hey!);