C 库函数 int fprintf(FILE *stream, const char *format, ...) 发送格式化输出到流 stream 中

#include <stdio.h>
#include <stdlib.h>

int main()
{
   FILE * fp;

   fp = fopen ("file.txt", "w+");
   fprintf(fp, "%s %s %s %d", "We", "are", "in", 2014);
   
   fclose(fp);
   
   return(0);
}
posted @ 2022-08-19 22:45  luoganttcc  阅读(8)  评论(0)    收藏  举报