File handling is an integral part of many medium-to-large-scale programs in C. Files are the most convenient way of managing data for the wide range of programs of this size. You will start this course by considering the advantages of using files in C and the most important functions for file handling, which are fopen() and fclose(). Explore the modes that fopen() can be used with and read and write data to text files. Begin by reading in individual characters with the fgetc() function, whole strings from a file using fgets(), and structured data with the fscanf() function. Discover how to use the r+, a+, and w+ modes, before turning to writing structured data using the fprintf() function. Next, learn how to read and write binary data by leveraging the fread and fwrite functions and the wb and rb modes. Finally, you will perform file seek operations using the functions fseek, ftell, and rewind to control the position your program is operating on in the file stream.
Perks of Course
Certificate: Yes
CPD Points: 120
Compliance Standards: AICC