#include <stdio.h>
#include <conio.h>
main()
{
printf("%d", getchar()!=EOF);
getch();
}
#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.