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; +}