|
From: vasanthsena x <vas...@ya...> - 2003-09-29 16:41:11
|
Can Someone tell me how getchar() and EOF work on Dev
C++. I have written the following program to count #
of lines.
#include <stdio.h>
main()
{
int c,nl=0;
while (( c= getchar()) != EOF)
++nl;
printf("%d\n",nl);
system("PAUSE");
return 0;
}
now before I get any output the screen disappears.As
you can see I have included system("PAUSE");
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
|