<?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 #13 — Pointers II, Part Two | Live</title>
        <link>https://watch.linuxrenaissance.com/videos/watch/ac555ed9-e92a-4c7b-ab25-371489cdf0dc</link>
        <description>In Lesson 13 of Learn C With Me, we continue Chapter 11 — Pointers II from Beej's Guide to C Programming, this time exploring one of C's most interesting features: void pointers. We learn how a pointer can refer to data without specifying its type, why generic pointers are useful, and how standard library functions such as memcpy() and qsort() can work with different kinds of data. We cover: What void * means in C, The difference between typed pointers and generic pointers, Why void * can point to different data types, Understanding generic functions, Using memcpy() to copy memory, Source and destination pointers, Understanding byte counts and size_t, Copying character arrays and other data, Why void * cannot be dereferenced directly, Why standard C doesn't support arithmetic on void *, Converting generic pointers to typed pointers, Using casts when working with pointers, Understanding pointer types and memory representation, Returning pointers from functions, Why library functions often return void *, Introducing qsort(), Sorting arrays containing structs, Writing a comparison function, Why comparison functions receive const void * arguments, Converting those arguments to the appropriate pointer type, Sorting structs by one of their fields, Understanding the arguments passed to qsort(), How comparison results determine sorting order, Compiler errors, debugging and reading manual pages, One of the biggest challenges in this lesson is understanding how void * makes generic programming possible in C. A function such as memcpy() doesn't need to know whether it is copying characters, integers or other data. It works with memory and a specified number of bytes. We also discover the limitations of generic pointers. Since a void * doesn't specify the pointed-to object's type, we cannot simply dereference it or perform ordinary pointer arithmetic on it. Later, we experiment with qsort(), sorting an array of animal structs by their number of legs. This introduces another important concept: passing a comparison function to a library function so it knows how to order our data. As usual, we read the book, experiment, make mistakes, consult the manual pages, get help from the live chat, and try to understand why C works the way it does. This stream completes our exploration of Pointers II. 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:25:00 Beginning the C lesson 00:28:22 Understanding void pointers 00:34:01 Generic functions and void * 00:35:05 Introducing qsort() 00:37:32 Understanding memcpy() 00:40:56 Experimenting with generic pointers 00:55:00 Copying memory in practice 01:20:00 Understanding memory sizes 01:23:34 Why generic pointers are useful 01:28:05 Limitations of void pointers 01:33:00 Why pointer arithmetic needs a type 01:44:58 Converting void pointers 02:12:36 Final section of the chapter 02:15:42 Sorting with qsort() 02:18:09 Comparison functions 02:22:31 Sorting an array of structs 02:27:34 Calling qsort() 02:30:05 Debugging compiler errors 02:38:02 Reading the qsort manual 02:45:16 Understanding comparison results 02:48:02 Homework discussion 02:55:00 Post-lesson chat 📅 We go live every Sunday 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 #clanguage #programming #linux</description>
        <lastBuildDate>Tue, 20 Oct 2026 01:45:13 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 #13 — Pointers II, Part Two | Live</title>
            <url>https://watch.linuxrenaissance.com/lazy-static/avatars/9c56e2c1-4172-455c-9801-e3a8bad36429.gif</url>
            <link>https://watch.linuxrenaissance.com/videos/watch/ac555ed9-e92a-4c7b-ab25-371489cdf0dc</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=ac555ed9-e92a-4c7b-ab25-371489cdf0dc" rel="self" type="application/rss+xml"/>
    </channel>
</rss>