Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Enumerations (`enum`) | C Programming Fundamentals lesson | BraveProgrammer
  1. Courses
  2. /
  3. C Programming Fundamentals

Lesson 20 of 50

·c

Enumerations (`enum`)

6 mins

Course progress40%

What you'll learn

Keep these ideas in mind as you work through the lesson.

3 points
  • Enum constants are of type `int` unless a different underlying type is forced (C11).
  • Useful for readable code and `switch` statements.
  • You can assign explicit values; subsequent values auto‑increment.

enum defines a set of named integer constants.

enum Color { RED, GREEN = 5, BLUE };
// RED=0, GREEN=5, BLUE=6
Make it stickPractice what you've learned1 quiz · 3 practical tests · Optional activities from C Programming FundamentalsBrowse activities
Previous lessonUnionsContinue to lesson 21Bitwise OperationsBack to C Programming Fundamentals curriculum