Save this video — free

7.2 - Arrays (2026-10-09)

Chris Bourke · 47:41 · Watch on YouTube

7.2 - Arrays (2026-10-09) Watch on YouTube →

Overview

Chris Bourke explains C arrays by contrasting fixed-size stack arrays with dynamically allocated heap arrays, then demonstrates how to allocate, use, and release memory safely. He shows why C programs must track array lengths explicitly, how to pass arrays to functions, and how `const` prevents unintended changes; the lecture ends with a deliberately buggy sum function for the next class.

Key takeaways

Chapters

0:00 Course Reminders and the Shift to C Arrays
4:00 Static Stack Arrays Versus Dynamic Heap Arrays
8:00 Allocating Memory, Handling Failure, and Staying in Bounds
12:00 Why `free` Prevents Memory Leaks
21:00 Use-After-Free, Double-Free, and Invalid Pointers
27:40 Dynamic Arrays Require Explicit Size Bookkeeping
31:24 Building `print_array` with a Pointer and Length
36:00 Testing Array Edge Cases and Protecting Data with `const`
43:33 Array-Function Review and the Next Class's Buggy Sum

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Chris Bourke.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.