#include <stdio.h>
 
int main ( void )
{
	static const char filename[] = "file.txt";
	FILE *file = fopen (filename, "r");
	if ( file != NULL )
	{
		char line [128];

		while (fgets (line, sizeof line, file) != NULL)
		{
			fputs (line, stdout);
		}
		fclose (file);
	}
	else
	{
		perror (filename);
	}
	return 0;
}