Verify that the expression getchar() != EOF is 0 or 1. - C Data Type

C examples for Data Type:char

Description

Verify that the expression getchar() != EOF is 0 or 1.

Demo Code

#include <stdio.h>

int main(void)
{
    printf("Please enter a character:\n");
    printf("The expression \"getchar() != EOF\" is %d.\n", getchar() != EOF);
    return 0;/*from w  w w. j a  va  2  s .  c o  m*/
}

Result


Related Tutorials