From c3c85aae8ef3e95a5284e9ae0d5c2478540b227d Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Tue, 1 Sep 2020 23:45:23 -0400 Subject: [PATCH] Left off at exercise 1-8 --- ch_01/exercise_01-06/main.c | 16 ++++++++++++++++ ch_01/exercise_01-07/main.c | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 ch_01/exercise_01-06/main.c create mode 100644 ch_01/exercise_01-07/main.c diff --git a/ch_01/exercise_01-06/main.c b/ch_01/exercise_01-06/main.c new file mode 100644 index 0000000..347f784 --- /dev/null +++ b/ch_01/exercise_01-06/main.c @@ -0,0 +1,16 @@ +/* + * + * Exercise 1-6. Verify that the expression getchar() != EOF is 0 or 1 + * + * Author: Kun Deng + */ + +#include + + +int main() +{ + printf("expression getchar() != EOF is %d\n", (getchar() != EOF)); + + return 0; +} diff --git a/ch_01/exercise_01-07/main.c b/ch_01/exercise_01-07/main.c new file mode 100644 index 0000000..f144d4e --- /dev/null +++ b/ch_01/exercise_01-07/main.c @@ -0,0 +1,16 @@ +/* + * + * Exercise 1-7. Write a program to print the value of EOF. + * + * Author: Kun Deng + */ + +#include + + +int main() +{ + printf("The value of the symbolic constant EOF is %d\n", EOF); + + return 0; +}