if you have a file, you don't have "EOF" character at the end of the file
Read again what I said. I am talking about input from the terminal and not from a file. I never said there is a EOF character at the end of a file. The EOF is sent when the file marker reaches the end. This EoF is not present in the file. The kernel can automatically send this when it detects that file read has reached the end
For terminal input, you have to specify EOF using a OS designated Ctrl+<> key combination. This must be done manually because a kernel can't detect this case. It is true that the terminal driver handles this key combination and then signals the kernel saying end of input is reached. The kernel interprets this and sends a specific return value to the read system call made after the end of input. This is then changed into the EOF macro that C uses. In the case of a read call on a file, there is no interrupt mechanism required to signal end if input as the kernel knows when the file end is reached and it repeats exactly the same process it did for the terminal (minus the manually sending the EoF part).
EOF is not a C specification btw but is infact a POSIX specification.