<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Learn C With Me #09 — File I/O, Part One | Live</title>
        <link>https://watch.linuxrenaissance.com/videos/watch/98dc2780-76d7-4711-b1c1-ff536c41f051</link>
        <description>In Lesson 9 of Learn C With Me, we begin one of the most practical topics we've encountered so far: File Input/Output in C. Using Beej's Guide to C, we learn how C represents open files using FILE *, how to open and close files, and how to read and write text data using standard library functions. We cover: What file input/output means in C, The FILE * data type and the concept of streams, The standard streams stdin, stdout, and stderr, Why stdout and stderr are separate streams, A quick look at shell redirection, Text and binary streams, Opening files with fopen(), File modes such as "r", "w", and "a", Closing files with fclose(), Reading characters with fgetc(), Understanding EOF, Why fgetc() returns an int instead of a char, Reading lines with fgets(), Using a character array as an input buffer, What happens when a line is larger than the buffer, Formatted file input with fscanf(), Reading multiple values from structured text files, Why scanf-style functions require care with untrusted input, Limiting string field widths to help avoid buffer overflows, Opening a file for writing, How "w" mode truncates an existing file, Writing characters with fputc(), Writing strings with fputs(), Writing formatted output with fprintf(), One important idea in this lesson is that C treats files as streams. The same model applies to stdin, stdout, and stderr. We spend plenty of time experimenting with fgets() and buffer sizes, and later see how careless use of fscanf() can cause buffer overflows and why field widths matter. Finally, we start writing text files using fputc(), fputs(), and fprintf(). As usual, we experiment, make predictions, make mistakes, get help from the live chat, and try to understand what C is actually doing rather than simply memorizing function calls. This is Part One of File Input/Output. We stop just before Binary File I/O, which we'll continue in the next lesson. This is an interactive, follow-along live course. I am learning C alongside you, so expect questions, mistakes, experiments and plenty of discussion. No passive watching here — participate in the chat and work through the examples with us. 00:00:00 Starting the stream 00:05:08 Recap &amp; today's topic: File I/O 00:23:53 The FILE * data type 00:25:57 stdin, stdout &amp; stderr 00:31:22 Reading text files 00:32:58 Opening our first file 00:46:16 Understanding fopen() and file modes 00:53:38 Closing files with fclose() 00:55:24 Reading a file character by character 00:56:12 EOF and why fgetc() returns int 01:07:25 Reading lines with fgets() 01:45:11 Experimenting with fgets() buffer sizes 02:14:11 Formatted input with fscanf() 02:45:18 Writing text files 02:48:08 fputc(), fputs() &amp; fprintf() 03:02:09 Binary File I/O postponed to next lesson 03:03:44 Post-stream chat 📅 We go live every Saturday at 19:00 CEST — interactive, follow-along C programming sessions. 📖 Study material: Beej's Guide to C 📚 Course materials: Linux Renaissance C Programming Course 💬 Homework &amp; discussion: Linux Renaissance Forum 📺 All C Programming lessons: C Programming playlist 🔴 This stream is proudly sponsored by OPNsense — the open source firewall and routing platform trusted by professionals worldwide. OPNsense Support Linux Renaissance🛒 Shop: Linux Renaissance Shop ☕ Ko-fi: Ko-fi 🎖️ Patreon: Patreon ▶️ YouTube membership: YouTube Membership Find me elsewhere🌐 Blog: Linux Renaissance 🎥 PeerTube: Linux Renaissance on PeerTube 📺 Odysee: Linux Renaissance on Odysee 🎮 Twitch: Linux Renaissance on Twitch 💬 Matrix: Linux Renaissance Matrix space</description>
        <lastBuildDate>Tue, 22 Sep 2026 08:16:03 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>PeerTube - https://watch.linuxrenaissance.com</generator>
        <image>
            <title>Learn C With Me #09 — File I/O, Part One | Live</title>
            <url>https://watch.linuxrenaissance.com/lazy-static/avatars/9c56e2c1-4172-455c-9801-e3a8bad36429.gif</url>
            <link>https://watch.linuxrenaissance.com/videos/watch/98dc2780-76d7-4711-b1c1-ff536c41f051</link>
        </image>
        <copyright>All rights reserved, unless otherwise specified in the terms specified at https://watch.linuxrenaissance.com/about and potential licenses granted by each content's rightholder.</copyright>
        <atom:link href="https://watch.linuxrenaissance.com/feeds/video-comments.xml?videoId=98dc2780-76d7-4711-b1c1-ff536c41f051" rel="self" type="application/rss+xml"/>
    </channel>
</rss>