创建一个文件使用fopen打开,然后使用fprintf输出,最后关闭文件流
FILE *out;
out = fopen("test.txt","a+");
if(out == NULL){
exit(EXIT_FAILURE);
}
printf("hello~\n");
int i;
for(i=;i<;i++){
fprintf(out,"heelo %d\n",i);
}
fclose(out);
2022-09-19 08:30:24
创建一个文件使用fopen打开,然后使用fprintf输出,最后关闭文件流
FILE *out;
out = fopen("test.txt","a+");
if(out == NULL){
exit(EXIT_FAILURE);
}
printf("hello~\n");
int i;
for(i=;i<;i++){
fprintf(out,"heelo %d\n",i);
}
fclose(out);