What are enumerations?

C Programming Language >   Operators and Enums in C Language >   About Java Tutorial  

Long Question

1062


Answer:

They are a list of named integer-valued constants.
Example:enum color { black , orange=4,yellow, green, blue, violet };
This declaration defines the symbols "black", "orange", "yellow", etc. to have the values "1", "4", "5" etc.
The difference between an enumeration and a macro is that the enum actually declares a type, and therefore can be type checked.


This Particular section is dedicated to Question & Answer only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.