N
neras
Hi..
I can't well english..i'm korean;...
At first,, You see the my source.
-----------------------------------------------
int main(void)
{
long nc=0;
while( getchar()!=EOF )
++nc;
printf("%ld\n",nc);
return 0;
}
--------------------------------------------------------
It is very short.
I thinking the result but my thinking not like compiler;
123ctrl+z123enter
I Thinking the print 3 and program is exit.
But program is not exit;
and I add the 3 line the at like bottm
123ctrl+z123enter
123ctrl+z123enter
123ctrl+z1231enter
ctrl+zenter
It Was Succed the program exit;
Result is 12.
Why don't the program was exit at first line ???
Why result is 12????
Is EOF at first in line???
Thx.
I can't well english..i'm korean;...
At first,, You see the my source.
-----------------------------------------------
int main(void)
{
long nc=0;
while( getchar()!=EOF )
++nc;
printf("%ld\n",nc);
return 0;
}
--------------------------------------------------------
It is very short.
I thinking the result but my thinking not like compiler;
123ctrl+z123enter
I Thinking the print 3 and program is exit.
But program is not exit;
and I add the 3 line the at like bottm
123ctrl+z123enter
123ctrl+z123enter
123ctrl+z1231enter
ctrl+zenter
It Was Succed the program exit;
Result is 12.
Why don't the program was exit at first line ???
Why result is 12????
Is EOF at first in line???
Thx.