Plz take time out to check if I have understood correctly
EOF is a value returned when the end of an input stream occurs. Its value in most systems is -1. In C, EOF is a macro defined as -1. Note that EOF is not some character returned from the input stream. In Unix, the end of input is indicated by ctrl+d (whose ascii value is 4) while in Windows, its Ctrl+Z (whose ascii value is 26). When receiving an input stream, if Ctrl+Z is sensed in Windows or Ctrl+D in Windows, Its interpreted as the end of input, and EOF (i.e. -1) is returned to the program. Both of them are also called EOT (End of transmission