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 course
    outline the basic concepts of file handling in C and when they are most appropriate to use
    identify fopen() file modes
    recognize common file functions
    create file handlers
    compare the read, write, and append modes
    read in characters from a file
    read in strings to an array
    read in structured data
  • write data out to a file
    read in data using r+, w+, and a+ modes
    write out structured data
    write out binary data using fwrite()
    read in binary data
    write out and read in structs from binary files
    position a file pointer using the ftell() and fseek() functions
    move a file pointer using the fseek() and rewind() functions
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 7s
    UP NEXT
  • Playable
    2. 
    Introduction to File Handling in C
    6m 21s
  • Locked
    3. 
    File Modes in C
    6m 21s
  • Locked
    4. 
    Functions Used to Parse Files in C
    7m 13s
  • Locked
    5. 
    Connecting to Files
    7m 53s
  • Locked
    6. 
    Using Different Modes to Parse Files
    7m 30s
  • Locked
    7. 
    Reading Data from Files
    6m 49s
  • Locked
    8. 
    Storing Data from Files in Strings
    6m 30s
  • Locked
    9. 
    Using Scanf() to Read in Structured Data
    10m 17s
  • Locked
    10. 
    Writing Data to Files
    6m 46s
  • Locked
    11. 
    Using r+, w+, and a+
    7m 36s
  • Locked
    12. 
    Using the fprintf() Function
    4m 43s
  • Locked
    13. 
    Writing Out Binary Data
    7m 25s
  • Locked
    14. 
    Reading in Binary Data
    4m 54s
  • Locked
    15. 
    Serializing and De-serializing Structs
    7m 51s
  • Locked
    16. 
    Controlling the Position of a File Pointer
    8m 30s
  • Locked
    17. 
    Moving a File Pointer
    8m 20s
  • Locked
    18. 
    Course Summary
    3m 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.