C code loops to infinite instead of breaking at EOF
I am trying to read char-by-char from a file. The code works successfully, however – after it correctly prints all chars in the file, it prints weird diamond characters to infinite.
I am trying to read char-by-char from a file. The code works successfully, however – after it correctly prints all chars in the file, it prints weird diamond characters to infinite.