In general, there is no EOF symbol. That is, there is no cross-platform solution to this and even on specific platforms, the processing of such a character is purely hereditary and inconsistent. You complete the file by closing it.
However, to be pedantic, some operating systems support the literal end of a file character when reading files in certain modes. For example, if you are running Windows and using the C stdio API to read a file in text mode, then the literal control-Z (character code 26) will signal the completion of the file for stdio. This is a hold on MS-DOS that it has as a hold on CP / M. If you use stdio and read the file in binary mode, then control-Z will not complete the file.
However, you should only think of it as "know, do not use." You will want to know about this if you ever see overloaded I / O on Windows, but using it is crazy.
George phillips
source share