Pages

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

Friday, 19 April 2013

#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.
 

Search Box

Most Reading

Contact Form

Name

Email *

Message *