首页 > 技术文章 > 练习:fputs写入

fzhiyaoy 2019-01-28 14:44 原文

#include <stdio.h>
int main(void)
{
 FILE*file;
 file = fopen("C:\\test.txt","a");
 if(!file){
  printf("文件打开失败!");
  
 }
 fputs("\n大时代 123456989",file);
 system("pause");
 fclose(file);
 printf("文件已关闭!\n");
 
 system("pause");
 return 0;
}

推荐阅读