diff options
author | aabacchus <ben@bvnf.space> | 2021-05-19 00:11:26 +0100 |
---|---|---|
committer | aabacchus <ben@bvnf.space> | 2021-05-19 00:11:26 +0100 |
commit | 3a14f3cf7a1bd094ae73a4d2ca151464a9eda224 (patch) | |
tree | 21ca13dd11b0ea7f79feb110b954050b1656bf7a /cat.c | |
download | kandr-3a14f3cf7a1bd094ae73a4d2ca151464a9eda224.tar.gz |
might as well make commits out of these
Diffstat (limited to 'cat.c')
-rw-r--r-- | cat.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cat.c b/cat.c new file mode 100644 index 0000000..eaf8cd3 --- /dev/null +++ b/cat.c @@ -0,0 +1,10 @@ +// from section 1.5 of K&R +#include <stdio.h> + +int main() { + int c; + while ((c = getchar()) != EOF) { + putchar(c); + } + return 0; +} |