Possible Duplicate:
Why doesn’t getchar() recognise return as EOF in windows console?
I'm trying to print out the value in the variable 'nc' in the next program:
int main()
{ 
 long nc;
 nc = 0;
 while (getchar() != EOF)
 ++nc;
 printf("%ld\n", nc); 
}
Please tell me why is it not printing?
 
     
     
     
     
     
    