|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include<stdio.h>
#include<stdlib.h>
int main()
{
FILE *fp, *fz,*fn;
int a, b,c;
char f_pic[30], f_file[30], f_new[30];
char ch;
printf("请输入图片名:");
scanf_s("%s", f_pic, 30);
printf("请输入文件名:");
scanf_s("%s", f_file, 30);
printf("请输入新生成文件名");
scanf_s("%s", f_new, 30);
if ((a = fopen_s(&fp, f_pic, "rb")) != 0)
{
printf("open the pic eorror a=%d\n",a);
exit(0);
}
else
{
printf("open the FILE ......\n");
}
if ((b = fopen_s(&fz, f_file, "rb")) != 0)
{
printf("open the FILE eorror\n");
exit(0);
}
else
{
printf("open the FILE ......\n");
}
if ((c = fopen_s(&fn, f_new, "wb")) != 0)
{
printf("open the NEW FILE eorror\n");
exit(0);
}
else
{
printf("open the FILE ......\n");
}
while (feof(fp) == 0)
{
ch = fgetc(fp);
fputc(ch, fn);
}
fclose(fp);
while (feof(fz) == 0)
{
ch = fgetc(fz);
fputc(ch, fn);
}
fclose(fz);
fclose(fn);
system("pause");
} |
评分
-
参与人数 1 | 荣誉 +3 |
鱼币 +3 |
贡献 +3 |
收起
理由
|
旋风0级
| + 3 |
+ 3 |
+ 3 |
提示:没有C相关的编译工具 |
查看全部评分
|