From 79b094050271b4dc382cb3de80a0838afd47722e Mon Sep 17 00:00:00 2001 From: Reina Harrington-Affine Date: Thu, 7 Aug 2025 23:25:33 +0000 Subject: [PATCH] Implemented exercise 1-6 for additional testing and modification. --- KNR C/ex1_6-getchar.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 KNR C/ex1_6-getchar.c diff --git a/KNR C/ex1_6-getchar.c b/KNR C/ex1_6-getchar.c new file mode 100644 index 0000000..caf0f19 --- /dev/null +++ b/KNR C/ex1_6-getchar.c @@ -0,0 +1,11 @@ +#include + +/*Copy input to output; KNR C exercise 1-6*/ + +int main(){ + int c; + + while ((c = getchar()) != EOF) + putchar (c); +return 1; +}