TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Interviews
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
What is an Enumeration Constant?
By
Tripti Tiwari
in
C, C++, MFC
on
Oct 04
2013
0
2.2k
2
Post Your Answer
Submit
Feb, 2015
14
http://www.programiz.com/c-programming/c-enumeration
0
Oct, 2013
4
Enumeration is a data type. We can create our own data type and define values that the variable can take. This
can help in making program more readable. enum definition is similar to that of a structure.
Example: consider light_status as a data type. It can have two possible values - on or off.
enum light_status
{
on, off
};
enum light_status bulb1, bulb2;
/* bulb1, bulb2 are the variables */
Declaration of enum has two parts:
a) First part declares the data type and specifies the possible values, called 'enumerators'.
b) Second part declares the variables of this data type.
We can give values to these variables:
bulb1 = on;
bulb2 = off;
0
Which bitwise operator is suitable for checking whether a particular bit is ON or OFF?
What are the advantages of unions?
Most Popular Job Functions
Developer (2376)
Programmer (1288)
Sr. Developer (826)
Sr. Programmer (449)
Fresher (398)
Tech Lead (378)
DBA (244)
Team Lead (187)
Project Lead (83)
Architect (28)
View All
MOST LIKED QUESTIONS
Why do you want to leave your current company?
What are the advantages of using REST in Web API?
What is ASP.NET Core?
How to iterate through ArrayList in jQuery?
What is the difference between TempData keep() and peek() function?
A class provides a default constructor for me. I write a constructor that takes a string as...
Can multiple catch blocks be executed in a C# program?
what is Sealed class
What were your responsibilities in your previous job ?
What Operating Systems Node.js Supports