learn_c/intro/read_char.c

14 lines
160 B
C
Raw Permalink Normal View History

2023-11-13 18:18:50 +00:00
#include <stdio.h>
/* copy input to output; 1st version */
main()
{
int c;
c = getchar();
while (c != EOF) {
putchar(c);
c = getchar(c);
}
}