以下程序的功能是将文件exam1.c的内容复制到exam2.c中,请填空。 #include main() { FILE *fp,*fp; fp1=fopen(___①___); fp2=fopen(___②___); while(!feof(fp1)) fputc(__③___); fclose(fp1); fclose(fp2); }
举一反三
- 以下程序的功能是将文件file1.c的内容输出到屏幕上并复制到文件file2.c中。请填空。#include <;stdio.h>;int main( ){ _______; fp1=fopen("file1.c","r"); fp2=fopen("file2.c","w"); while(!feof(fp1))putchar(fgetc(fp1)); _______; while(!feof(fp1)) fputc(______); fclose(fp1); fclose(fp2); return 0;}
- 以下程序的功能是将文件file.c的内容输出到屏幕上并复制到文件file2.c中。请填空。int main (void){ FILE *fp1,*fp2; fp1=fopen("file1.c","r"); fp2=fopen("file2.c","w"); while(!feof(fp1)) putchar(fgetc(fp1)); ____; while(!feof(fp1)) fputc(____); fclose(fp1); fclose(fp2); return 0;}
- 程序的功能是将文件filel.c的内容输出到屏幕上并复制到文件file2.c中,请填空。#include<stdio.h>main(){FILE【19】;fp1=fopen("filel.c","r");fp2=fopen("file2.c","w");while(!feof(fp1))putchar(getc(fp1));rewind(fp1);while(!feof(fp1))putc(【20】);fclose(fp1);fclose(fp2);}
- 以下程序执行后,文件test.txt的内容是() #include void main() { FILE *fp; fp=fopen(“test.txt”,”w”); fprintf(fp,”%s”,”How ”); fclose(fp); fp=fopen(test.txt“,”a”); fprintf(fp,”%s”,”are you!”); fclose(fp); }
- 以下程序的功能是将文件file1.c的内容输出到屏幕上并复制到文件file2.c中。请填空。#include <;stdio.h>;int main( ){ _______; fp1=fopen("file1.c","r"); fp2=fopen("file2.c","w"); while(!feof(fp1))putchar(getc(fp1)); _______; while(!feof(fp1)) putc(______); fclose(fp1); fclose(fp2); return 0;}