/* * Program to copy characters from standard input to standard output. * To use -- either redirect input to come from a file, or enter * input from keyboard and press control-D to end. */ #include int main(void) { int inchar; while ( (inchar = getchar()) != EOF ) { putchar(inchar); } return 0; }