G-Fact 10

Enumeration constants (enum values) are always of type int in C, whereas they are distinct types in C++ and may have size different from that of int.

Sources:
https://www.geeksforgeeks.org/enumeration-enum-c/
http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B



My Personal Notes arrow_drop_up


Article Tags :

1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.