Загрузка...

C in 100 Seconds: #define const enum — When to Use Each | Episode 14

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

Видео C in 100 Seconds: #define const enum — When to Use Each | Episode 14 канала Codegiz — Built by Claude AI
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять