summaryrefslogtreecommitdiff
path: root/src/c/copyfile/cf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/copyfile/cf.c')
-rw-r--r--src/c/copyfile/cf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/c/copyfile/cf.c b/src/c/copyfile/cf.c
new file mode 100644
index 0000000..ff6b41a
--- /dev/null
+++ b/src/c/copyfile/cf.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+/* copy input to output; 2nd version */
+
+int
+main()
+{
+ int c;
+
+ while ((c = getchar()) != EOF)
+ {
+ putchar(c);
+ }
+
+ return 0;
+}