请编程将存在于磁盘C:(c语言)

王德发国际 |浏览402次
收藏|2020/05/07 07:02

满意回答

2020/05/07 07:22

程序参考#include <stdio.h>int main(){ FILE *f1,*f2,*f3; char buff[1024]; f1=fopen("t1.txt","r"); f2=fopen("t2.txt","r"); f3=fopen("t3.txt","w"); while(fgets(buff,1024,f1)) { fprintf(f3,buff); if (fgets(buff,1024,f2)) fprintf(f3,buff); } while(fgets(buff,1024,f2)) fprintf(f3,buff); fclose(f1); fclose(f2); fclose(f3); return 0;}结果t3内容为111AAA22222BBBBBB3333333CCCCCCCCDDDDDDDDDD

whoami1978

其他回答(0)
0人关注该问题
+1

 加载中...