C Programming

TESTING FOR THE End Of File TERMINATOR (feof)
This is a built in function incorporated with the stdio.h routines. It returns 1 if the file pointer is at the end of the file.


	if( feof ( input_file ))
		printf("Ran out of data.\n");


THE fprintf AND fscanf STATEMENTS
These perform the same function as printf and scanf, but work on files. Consider,


	fprintf(output_file, "Now is the time for all..\n");
	fscanf(input_file, "%f", &float_value);


ęCopyright B Brown. 1984-1999. All rights reserved.