readtext.c

来自「c版本的」· C语言 代码 · 共 19 行

C
19
字号
                                         /* Chapter 10 - Program 4 */
#include "stdio.h"

main()
{
FILE *fp1;
char oneword[100];
char c;

   fp1 = fopen("TENLINES.TXT","r");

   do {
      c = fscanf(fp1,"%s",oneword); /* got one word from the file */
      printf("%s\n",oneword);       /* display it on the monitor  */
   } while (c != EOF);              /* repeat until EOF           */

   fclose(fp1);
}

⌨️ 快捷键说明

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