Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Dynamically Allocate An Array Of Structs | C Programming Tutorial

47.3K views on YouTube

How to dynamically allocate an array of structs in C, including how to use realloc() to re-allocate and increase the size of the array, and a warning about potential memory leaks that can occur if we forget to free dynamically allocated memory that the array struct members themselves point to (including how to prevent the memory leak). Source code: https://github.com/portfoliocourses/c-example-code/blob/main/dynamic_array_of_structs.c. Check out https://www.portfoliocourses.com to build a portfolio that will impress employers!