Difference between EOT and EOF
I understand that EOT is ASCII code 4, whereas EOF is encoded as -1 (at least in C). Before I found out that EOF is mapped to -1, I thought it was just a synonym for EOT. Why is EOF mapped to -1 rather than EOT? As far as I can tell, they both do the same thing, which is to terminate a file stream. The only difference I can discern is that EOT also terminates a command in the bash shell. I would like a description of the precise technical differences between these two codes.