17 lines
244 B
C
17 lines
244 B
C
#include <stdio.h>
|
|
|
|
void main()
|
|
{
|
|
FILE *fp;
|
|
int c;
|
|
|
|
fp = fopen( "file", "r" );
|
|
if( fp != NULL ) {
|
|
c = fgetc( fp );
|
|
if( ferror( fp ) ) {
|
|
printf( "Error reading file\n" );
|
|
}
|
|
}
|
|
fclose( fp );
|
|
}
|