C Programming Tutorial 44, Enumerations


Gilberto Barrios says:


Jammy Dodger says:

Could you tell me what software you’re using as your C editor please?

Thanks, loving that built in compiler.

Moussab Scar says:

thx dude

James Enk says:

good job thank you

tickyul says:

Thank you, you scared me! Actually there is still a lot of books being printed for C programming. I believe the Mars shuttle mission was controlled by 30000 pages of code……all written in C…..not C++.

TangoBravo says:

And this is really good then, say…in a switch statement. Since you have to switch on an integer (or an expression that evaluates to an integer), then you can switch on one of the enum values. LIke this:

void printPhrase(season s) {
switch(s) {
case summer:


任康硕 says:


RCStuff says:


Dustin Chang says:

Best explanation video i’ve ever seen of any programming tutorial. Very descriptive and clear, and tons of examples shown. Thank you so much.

Nadia Scott says:

Thanks for the video on enum. Video help me understand the topic.
Your a great teacher. Keep it up

iTzAdam5X says:

It’s good for representing items. For instance, let’s say that you’re making a game and the weapons in the game are as follows: knife, pistol, shotgun, sniper. Well it doesn’t make sense really to store the weapon the player’s using as a string, so you’d store it as an enum value.

tickyul says:

UNBELIEVABLE……a C video in English!!!!!!!!

LeftPlay says:

I just love the way you say “Yep, perfect” 😀

Mitchel Paulin says:

Another interesting thing to note is if you go over the bounds of the enum, for example calling printPhrase(10) in this video (assuming that these are numbered 0…3) it just prints out the last value in the enum without throwing some type of error, so again in this video, it would be spring

float says:

Awesome, Thanks!

M. Mohammad says:

Hey I am using c++ visual basic and i can get it to print one of the phrases by putting a number inside the brackets in the main…?? but it Works fine if i type one of the seasons

TangoBravo says:

One question Adam: Why “else if (s == spring)” ?

Are there any other seasons you’ve left out? Why not use “else” for the last control arm? 😉

thewhisperinyourears says:

Adam i dont get what is enum good for?

Yogev Heskia says:

thank you so much!

tickyul says:

Please don’t say that…..C is still very valid. I am very, very retarded and have worked very hard to learn C…..I am now as competent as a dumb 3rd grader. C++ is just a cheap, bullshit ripoff.

geekynewz says:


les paul says:

First of all, one of the best tutorial playlists on Youtube and thank you so much for it. Later on what if i want to check user’s answer. I created this:
char Input;                                            

printf(“Which season is in there ?n”);
scanf(“%s”, &Input);


Rest of the code is an exact copy of yours. But it doesn’t work. It runs and i give an input but than nothing happens. Anyone has any idea ? 

Dice 'n Rice says:

yup perfect!! * 1000000
good tutorial!!

tailor John says:

omg! amazing tutorial, I’ve been using enums in my microcontroller project without understanding its syntax, it confused me a lot. but now i get it 😀

Michael Knox says:

Thank you so much…your demonstration is better than a book!

Alexander G says:

it gives me a compilation erro when i call the method print: argument of type int is incompatible with parameter of type “myEnum”. Please someone explain.

undercurrent says:

great vid very clear

puneet sohi says:

Excellent video!

RCStuff says:

nah I take my words back. C is still very widespread for scientific programming, embedded systems etc. Linux is written in C.
C++ is not a ripoff, its object oriented, has classes, templates etc. Both are great languages, I’d say THE best. So yea, C/C++ forever!

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours