Lesson 31
Unlock this lesson
Create a free account, then buy the course to open every lesson.
What you will learn in this lesson
- Give names to a fixed set of choices with enum.
- See the numbers that C gives each name, and set your own.
- Use an enum in a switch, and let gcc warn you about a missing case.
- Share one piece of memory between members with union.
- Compare the size of a structure and a union.
Everything in C Programming: BCA, MCA, BTech & O Level
- 37 step-by-step lessons
- 10 mini projects with solutions
- A final project for your portfolio
- Real commands and real output in every lesson
- Practice task with a solution in each lesson
- Progress saved to your account