EOF symbolic constant
问题 From The C Programming Language : int c; while ((c = getchar()) != EOF) putchar(c); "... The solution is that getchar returns a distinctive value when there is no more input, a value that cannot be confused with any real character. This value is called EOF , for "end of file." We must declare c to be a type big enough to hold any value that getchar returns. We can't use char since c must be big enough to hold EOF in addition to any possible char ." I checked in stdio.h and printed the value