Verify that the expression getchar() != EOF is 0 or 1.
Used CRTL + Z to type EOF character which looks like this: ^Z
#include <stdio.h>
int main(){
int value = getchar() != EOF;
printf("%d", value);
}
Ran program twice. First time input a random character which returns true. Second time input EOF character value, which returns false.