Honestly I had no idea what ctrl+d even did, I just knew it was a convenient way for me to close all the REPL programs I use. The fact that it is similar to pressing enter really surprised me, so I wanted to share this knowledge with you :)
Honestly I had no idea what ctrl+d even did, I just knew it was a convenient way for me to close all the REPL programs I use. The fact that it is similar to pressing enter really surprised me, so I wanted to share this knowledge with you :)
It’s not. You keep insisting that ^D doesn’t send EOF and yet:
^D is the EOF character. The thing is that in C every line of a text file must be terminated by a new-line. And so, when you end a file with ^D without a return, you get funky results.
To be more precise, it’s the “EOT” (end of transmission) control character, the 4th symbol in ASCII, from the non-printable character area.