So I tried searching google a bit for what exactly EOF is in C and what it does, and I keep getting these complex explanations for it. I'm just starting out in C, so could someone dumb it down for me and explain what EOF is and does?
this is the code. it's taken from page 18 of K&R's The C Programming Language.
Code:#include <stdio.h> main() { double nc; for (nc = 0; getchar() != eof; ++NC); printf(%.0f\n", nc); }