#include <stdio.h>
#include <stdlib.h>
int main( void )
{
FILE *fp;
int c;
fp = fopen( "/root/fstab", "r" );
if( fp != NULL ) {
c = fgetc( fp );
if( ferror( fp ) ) {
printf( "Error reading file\n" );
}
}
fclose( fp );
return EXIT_SUCCESS;
} 用-c参数能通过,但编译是就有
/tmp/cat*o
等。
就只有这样的提示,没有具体说错在那里!