7
Copy the input flow into the output flow
- #include <stdio.h>
- main() {
- int c;
- while ( (c = getchar()) != EOF )
- putchar(c);
- }
$ gcc -o fcopy fcopy.c
$ ./fcopy < fcopy.c
#include <stdio.h>
main() {
int c;
while ( (c = getchar()) != EOF )
putchar(c);
}
$ ./fcopy < fcopy.c > fcopy2.c
$ cat fcopy2.c
Comments