题目内容

C盘中p1.c.txt文件的内容为:abcde。A盘中p1.c.txt为空文档。 #include<stdio.h> #include<stdib.h> main() {FILE *f1 *f2; int k; if((f1=fopen("C:\\p1.c.txt","r"))==NULL) {printf("can not open file!\n"); exit(0); } if((f2=fopen("A:\\p1.c.txt","w"))==NULL) {printf("can not open file!\n"); exit(0); } for(k=1;k<=500;k++) {if(feof(f1))break; fputc(fgetc(f1),f2); } fclose(f1); fclose(f2); } 以上程序的功能是______。

查看答案
更多问题

C语言早期规定可以采用两种方式建立文件缓冲区:______、______。

从函数定义的角度来分,函数可以分为______和______。

函数fgetc()若正确地读出字符,则返回______,否则返回______。

strcmp(字符串1,字符串2),如果“字符串1”小于“字符串2”,函数返回______;如果“字符串1”等于“字符串2”,函数返回______。

答案查题题库