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
iOS
Java
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
1k
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 (1609)
Programmer (1253)
Senior Management (1222)
Sr. Developer (666)
Sr. Programmer (432)
Fresher (402)
Tech Lead (265)
DBA (245)
Team Lead (189)
Project Lead (86)
View All
MOST LIKED QUESTIONS
What are the advantages of using REST in Web API?
Why do you want to leave your current company?
A class provides a default constructor for me. I write a constructor that takes a string as...
Which Is Faster MVC or ASP.net ?
What is file extension of Webservices in .Net?
What is ASP.NET Core?
.NET interview questions :- Can you explain architecture of your project ?
In which situation(s), the use of "Delegate" is a good idea?
What is a View ?Can we insert,Update and delete a view?
What is the difference between Convert.ToString() and .ToString()?