填空,下面程序将文件内容全部输出到屏幕上,其文件名从命令行参数中获得。 #include
void main(int argc, char *argv[] ) { FILE*fp; char ch; if( argc < 2 ) { printf("error:no file name!\n"); exit(1); } if( ( fp=fopen(_______,"r") ) == NULL) { printf("Can't open file!\n"); exit(2); } while( (ch=fgetc(fp))!= _______ ) printf("%c",ch); fclose(______); }