The Expression getchar()!=EOF is 0 or 1.

4/20/2013 01:47:00 am Unknown 0 Comments

#include <stdio.h>

#include <conio.h>
main()
{
      printf("%d", getchar()!=EOF);
      getch();  
}

NOTE:
It always print 1 when i enter any key axcept ctrl+z. It is a boolean expression so that its value is 0 or 1.