learn_c/intro/read_char2.c

12 lines
153 B
C

#include <stdio.h>
/* copy input to output; 2nd version */
main()
{
int c;
printf("%d", EOF);
while ((c = getchar()) != EOF)
putchar(c);
}