Save this video free

CS50 Fall 2025 - Lecture 1 - C (live, unedited)

CS50 · 3:04:41 · Watch on YouTube

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

David J. Malan introduces C by translating familiar Scratch ideas into source code, then demonstrates how to compile and run programs in CS50’s VS Code environment. Through examples such as `hello`, `compare`, `agree`, `cat`, and Mario, he teaches C syntax, types, conditionals, loops, functions, scope, and code quality, before showing how integer overflow, truncation, and floating-point imprecision can cause real-world failures.

Key takeaways

Chapters

0:00 Opening Segment Before the Supplied Transcript
17:45 Scratch Concepts Carry Over to C
22:03 Source Code, Machine Code, and the Compiler
23:15 VS Code’s Editor, Terminal, GUI, and CLI
26:02 Creating and Running the First C Program
31:35 How C Syntax Maps to Scratch and Uses Escape Sequences
39:28 Compiler Errors and the Purpose of Header Files
44:12 CS50 Manual Pages and Library Documentation
48:03 Getting a Name and Formatting Personalized Output
1:01:05 Linux Commands for Navigating Files and Folders
1:04:00 Using the CLI to Organize and Manage Source Files
1:13:03 C Conditionals and the Assignment Versus Equality Distinction
1:19:00 Comparison Operators and Boolean Logic
1:20:00 C Data Types and Printf Format Specifiers
1:23:35 Variables, Incrementing, and Comparing Integers
1:29:50 Flowcharts Reveal Redundant Conditional Checks
1:34:08 Character Input and Case-Insensitive Agreement Checks
1:39:38 While Loops and Counting Through Repetition
1:44:39 Building the Cat Example and Recognizing Infinite Loops
1:49:18 Stopping an Infinite Loop and Taking User Input
2:05:45 Validating Input with Loops and Understanding Variable Scope
2:16:20 Do-While Loops for Inputs That Must Be Requested Once
2:19:02 Creating a Meow Function and Declaring a Prototype
2:27:05 Function Arguments, Return Values, and Scope
2:30:14 Evaluating C Code for Correctness, Design, and Style
2:33:28 Abstracting Input Validation into a Return-Value Function
2:36:55 Mario’s Question-Mark Row and Brick Column
2:41:20 Nested Loops Build Mario’s Two-Dimensional Grid
2:45:00 Constants Prevent Repeated Dimensions from Drifting
2:47:00 A Simple C Calculator for Integer Addition
2:50:17 Multiplication, Exponential Growth, and Integer Overflow
2:56:21 The Boeing 787 Power-Counter Overflow Incident
2:58:41 Pac-Man’s Level 256 Integer Overflow
2:59:09 Integer Division Truncates Fractional Results
3:01:00 Floating-Point Imprecision in Decimal Calculations
3:01:57 Y2K, the 2038 Problem, and C’s Representation Limits

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

Transcript excerpt

17:46 All right, this is CS 50, and this is week 1, our second week together, and you'll recall that last week, week zero, we focused on scratch ultimately this graphical programming language by which you can drag and drop puzzle pieces that interlock together only if it makes logical sense to do so. And many of you had actually probably played with that in like middle school or even prior at some point, but for our purposes, the goals of Scratch were to give us sort of a mental model for some fundamental constructs that we're going to see again and again today in C in a few weeks in Python. And even thereafter, and those include things like functions and return variables and arguments and variables and loops and conditionals and more. And so even if today feels like a bit of a fire hose such as that pictured here, appreciate that a lot of today's ideas are exactly the same as last week's ideas. It's just that the syntax is going to change.

18:36 It's going to look a little different. It's going to look a little scarier. It's going to be harder to sort of memorize except with practice will come that muscle memory, but the ideas ultimately are going to be the same. And indeed this is, if unfamiliar, MIT down the road has a tradition of hacks whereby students once a year do something fairly crazy and at this point they happen to connect an actual working uh drinking fountain to an actual fire hydrant, and the sign there very pixelated says Getting an education from MIT is like trying to drink from a fire hose. And that's indeed how computer science, how programming, how CS 50 will sometimes feel, but realize that what's going to be ultimately most important is not where you.

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

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

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.