h0515.c

来自「学习C语言必备的好书」· C语言 代码 · 共 19 行

C
19
字号
#include <stdio.h>

int main(void)
{
   FILE *stream;
   int i = 100;
   char c = 'C';
   float f = 1.234;

   /* open a file for update */
   stream = fopen("DUMMY.FIL", "w+");

   /* write some data to the file */
   fprintf(stream, "%d %c %f", i, c, f);

   /* close the file */
   fclose(stream);
   return 0;
}

⌨️ 快捷键说明

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