Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.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
2
Reply
What is an Enumeration Constant?
Tripti Tiwari
11y
2.2k
0
Reply
Submit
http://www.programiz.com/c-programming/c-enumeration
Munesh Sharma
10y
0
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;
Tripti Tiwari
11y
0
Which bitwise operator is suitable for checking whether a particular bit is ON or OFF?
What are the advantages of unions?
Message