copyline.c
来自「《c与指针》书的代码 是我学习这本书时候敲出来的」· C语言 代码 · 共 16 行
C
16 行
/*
** Copy the standard input to the standard output, line by line.
*/
#include <stdio.h>
#define MAX_LINE_LENGTH 1024 /* longest line I can copy */
void
copylines( FILE *input, FILE *output )
{
char buffer[MAX_LINE_LENGTH];
while( fgets( buffer, MAX_LINE_LENGTH, input ) != NULL )
fputs( buffer, output );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?