You can only use fprintf() to append to a line of a file in one narrow case:
- the line to be appended to is the very last line of the file; and
- the line to be appended to does not end up carriage return or new line; and
- the file was not created in DOS mode ending in control-Z
In short, you can only append if the file just abruptly ends at the point that you want to append.
In this narrow case, open the file with 'a' or 'at' or 'a+' or 'at+' access mode and fprintf() will append to it.
