⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cex_13_2.c

📁 C程序学习者学习文件操作的好讲义,包含例题,这个讲义是本人清手做的,花了很长时间的.
💻 C
字号:
#include "stdio.h"
void main()
{
  FILE *in, *out;
  char ch;
  char infile[10], outfile[10];
  printf("Enter the infile name\n");
  scanf("%s", infile);
  printf("Enter the outfile name\n");
  scanf("%s", outfile);
  if ((in = fopen(infile, "r"))==NULL)
   { printf("can not open infile %s\n", infile);
     exit(0);
   }
  if ((out = fopen(outfile, "w"))==NULL)
  { printf("can not open outfile %s\n", outfile);
    exit(0);
  }
  while(!feof(in)) fputc(fgetc(in), out);
  fclose(in);
  fclose(out);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -