Can we write an EOF character ourselves?
There is no EOF character. EOF by definition “is unequal to any valid character code”. Often it is -1. It is not written into the file at any point. There is a historical EOF character value (CTRL+Z) in DOS, but it is obsolete these days. To answer the follow-up question of Apoorv: The OS never …