Advertisement



< Prev
Next >



C - Appending to a file on Disk




In our last article, we have explained how to write to a file on the disk. In this tutorial, we are going to explain how to append data to an existing file on disk. For this, the C language provides us a structure called FILE, which is defined in the header file <conio.h>. The FILE structure allows us to create, read, write/modify the file on disk.

The FILE structure provides us a function named fopen(), using which we could provide location of the file stored on the disk and in return(if the file is found), the fopen() function open the file and gives us a pointer which is pointed at either the first character position or the last character position in the file, depending on the mode in which we open this file. Let's read the file mode to use to append new data to the file.




Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement



Notifications



Please check our latest addition

C#, PYTHON and DJANGO


Advertisement