C in 100 Seconds: #define const enum — When to Use Each | Episode 14
0views
002:24
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Three ways to make values that don't change. #define replaces text before compilation — no type, no memory, just substitution. const creates a
typed variable the compiler won't let you modify. enum gives names to a set of integers — RED is 0, GREEN is 1, BLUE is 2.
PI becomes 3.14 through define. Year stays locked at 2026 through const. Color resolves to an int through enum. Each defined a different way,
all locked in place.
Student code: https://github.com/GoCelesteAI/c-in-100-seconds/tree/main/episode14
What You'll Learn:
• #define — preprocessor text substitution, no type
• const — typed variable that can't be changed
• enum — named integers, auto-incrementing from 0
• When to use each one
Next: Episode 15 — Type Casting
#c #programming #100seconds #learnc #const #define #enum #macros #preprocessor #tutorial
Tags
c constants, define c, const c, enum c, preprocessor macros, define vs const, c tutorial 2026, c beginner, 100 seconds, learn c, coding
tutorial
Tags
c constantsdefine cconst cenum cpreprocessor macrosdefine vs constc tutorial 2026c beginner100 secondslearn ccoding tutorial