Advanced Topics in C: Getting Started with File Handling
C 17
| Expert
- 18 Videos | 2h 31s
- Includes Assessment
- Earns a Badge
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.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this courseoutline the basic concepts of file handling in C and when they are most appropriate to useidentify fopen() file modesrecognize common file functionscreate file handlerscompare the read, write, and append modesread in characters from a fileread in strings to an arrayread in structured data
-
write data out to a fileread in data using r+, w+, and a+ modeswrite out structured datawrite out binary data using fwrite()read in binary datawrite out and read in structs from binary filesposition a file pointer using the ftell() and fseek() functionsmove a file pointer using the fseek() and rewind() functionssummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview2m 7sUP NEXT
-
2.Introduction to File Handling in C6m 21s
-
3.File Modes in C6m 21s
-
4.Functions Used to Parse Files in C7m 13s
-
5.Connecting to Files7m 53s
-
6.Using Different Modes to Parse Files7m 30s
-
7.Reading Data from Files6m 49s
-
8.Storing Data from Files in Strings6m 30s
-
9.Using Scanf() to Read in Structured Data10m 17s
-
10.Writing Data to Files6m 46s
-
11.Using r+, w+, and a+7m 36s
-
12.Using the fprintf() Function4m 43s
-
13.Writing Out Binary Data7m 25s
-
14.Reading in Binary Data4m 54s
-
15.Serializing and De-serializing Structs7m 51s
-
16.Controlling the Position of a File Pointer8m 30s
-
17.Moving a File Pointer8m 20s
-
18.Course Summary3m 25s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform
Digital badges are yours to keep, forever.