Learn C++ Language from the Best Tutors

• Affordable fees
• 1-1 or Group class
• Flexible Timings
• Verified Tutors

Search in

# What is Enum

Sr. Software Engineer

An enumeration is a set of named integer constants. An enumerated type is declared using the enum keyword. C# enumerations are value data type. In other words, enumeration contains its own values and cannot inherit or cannot pass inheritance.

12 years of work experience with 5 years of Pedagogical(teaching) experience)

Software Developer, Expertise in Java/J2ee Technology.

Enum is a collection of fixed no: of similar type of constants. Ex :1.) enum Direction{ LEFT, RIGHT, UP, DOWN } 2.) enum Days{ MON, TUE, WED, THU, FRI, SAT, SUN} Enum Direction is having 4 (fixed) directions, all comes in one category ie direction. Enum Days is having 7 (fixed) days, all...
Enum is a collection of fixed no: of similar type of constants. Ex :1.) enum Direction{ LEFT, RIGHT, UP, DOWN } 2.) enum Days{ MON, TUE, WED, THU, FRI, SAT, SUN} Enum Direction is having 4 (fixed) directions, all comes in one category ie direction. Enum Days is having 7 (fixed) days, all comes in one category ie days. read less

Enumerated Types allow us to create our own symbolic names for a list of related ideas .. in short .. we can create user defined data type by using "enum" keyword (short form of Enumerated )

An alternative method for naming integer constants.for ex enum {START,PAUSE,GOO}; Define three integer constants,called enumerators,and assigns values to them ,default value starts from 0. const int START =0; const int PAUSE =1; AND SO ON...

Python Trainer

In Python An enum/ enumeration is a set of symbolic names (members) bound to unique, constant values. Within an enumeration, the members can be compared by identity, and the enumeration itself can be iterated over.

Senior Engineer

An enumeration is a user-defined type whose value is restricted to one of several explicitly named constants(enumerators). Enumeration are defined using keyword: enum. you can refer this code for further explainantion, you can compile or debug to understand further you can contact me int main() ...
An enumeration is a user-defined type whose value is restricted to one of several explicitly named constants(enumerators). Enumeration are defined using keyword: enum. you can refer this code for further explainantion, you can compile or debug to understand further you can contact me int main() { enum Fruits{orange, guava, apple}; Fruits myFruit; int i; cout << "Please enter the fruit of your choice(0 to 2)::"; cin>> i; switch(i) { case orange: cout << "Your fruit is orange"; break; case guava: cout << "Your fruit is guava"; break; case apple: cout << "Your fruit is apple"; break; } return 0; } read less

MCA

Enum is a keyword in c, c++ is known as enumerate

Enumerated datatype

Set of named constants

Related Questions

What is the actual size of INT in the C language, 2 or 4 bytes?
The actual size to int is determined by the compiler as the program runs. But theoretically the size is 2 bytes. You can increase the size by adding keyword long infront of it to make the size 4 bytes. Eg int a; // 2 bytes Long int b; // 4 bytes
Kunal
What is a class?
Class is User defined data type, its contain data members and member function
Thinagaran
What is different between malloc and calloc?
The Diffrences are like-- malloc() takes a single argument (memory required in bytes), while calloc() needs two arguments. Secondly, malloc() does not initialize the memory allocated, while calloc() initializes...
Roopali

What is the main difference between returning value of a function and does not return any value of a function in  C. Which is correct void main(void), int main(void), int main(int) , or void main(int) and explain the main difference between int main() and int main(void).

A function may or may not return a value to the calling function. If the function is returning a value, then you have to mention the data type in the function definition and funtion declaration (like int,...
Mahesh Kondawar
How to register as teacher?
On the basis of his total experience and Qualification you can do it.
Shrikrishna

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Related Lessons

Upcasting and Downcasting
Converting a derived-class reference or pointer to a base-class reference or pointer is called upcasting. It is always allowed for public inheritance without the need for an explicit type cast. The downcasting,...

All About Programming And A Good Programmer.
Hi, This is my first lesson for you guys. Hope you enjoy reading it. In recent community questions, I found many people wanted to be good programmers, or wanted to have good hands on certain language,...

Efficient Learning Strategies
Type your notes after class Write your notes onto flashcards - Scrabble -Make posters Review flashcards while walking, at gym, etc. Dog-ear pages in the reading where you can find...

Polymorphism In C++
Basically polymorphism represents poly means many and morph means forms that many forms. In which we are passing same message to different objets but every object will work for that message in their own...

C++ Program-Factorial
//Header files #include<iostream.h>#include<conio.h> //Main function void main(){ int num,i; long factorial=1; //Function for clearing screen clrscr(); cout<< "Enter a number:";...
Find CPP Language near you

Looking for C++ Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

### Looking for C++ Language Classes?

The best tutors for C++ Language Classes are on UrbanPro

• Select the best Tutor
• Book & Attend a Free Demo
• Pay and start Learning

### Learn C++ Language with the Best Tutors

The best Tutors for C++ Language Classes are on UrbanPro