Tag: fwrite

C Programming: Dealing with files (Part – 3)

In our previous article, we have used “getrecord” function. We will start this article with thisfunction. We have to implement “getrecord” to fetch a record from “employee.dat” file. It will check the “employee.dat” file for an employee record based on the given…

C Programming: Dealing with files (Part – 2)

Another important buffered function ‘C’ provides is fwrite function. fwrite function writes to the file. The file should be opened with fopen function call. The syntax of this fwrite function is: size_t fwrite(const void *ptr, size_t size, size_t ntimes, FILE…

C Programming: Dealing with files (Part – 1)

‘C’ Programming provides good number of file handling functions to deal with files and directories or folders. Generally we can classify these functions as: Buffered functions and Un-buffered functions. Un-buffered functions are the raw function deal directly with storage devices.…