EOF is simply a macro designating a negative value. Some books are refered EOF is -1. It doesn't have to be -1. You can signal end-of-file from the command line with a control character(Ctrl ^), usually a combination of ctrl+z for Windows systems or ctrl+d for POSIX systems. Thanks, MJA