Added dumbtest.c to demonstrate a test for the boolean value of != EOF. Numerous modifications to ex1_6-getchar.c to that end before dumbtest.c became its own project- most modifications reverted.
This commit is contained in:
parent
93d53163f8
commit
6860b93049
1 changed files with 9 additions and 0 deletions
9
KNR C/dumbtest.c
Normal file
9
KNR C/dumbtest.c
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
|
||||||
|
int c = getchar() != EOF;
|
||||||
|
printf("%d", c);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue