A
aarklon
Hi all,
in the article
http://www.c-faq.com/struct/enumvsdefine.html
it is written as
Some advantages of enumerations are that the numeric values are
automatically assigned, that a debugger may be able to display the
symbolic values when enumeration variables are examined, and that they
obey block scope. (A compiler may also generate nonfatal warnings when
enumerations are indiscriminately mixed, since doing so can still be
considered bad style even though it is not strictly illegal.) A
disadvantage is that the programmer has little control over those
nonfatal warnings; some programmers also resent not having control over
the sizes of enumeration variables.
my question is
why is it written as sizes of enumeration variables are not under the
control of programmer
after all as per my understanding goes enumerations are integral data
types,so their
size should be less than or equal to that of int isn' t it???
in the article
http://www.c-faq.com/struct/enumvsdefine.html
it is written as
Some advantages of enumerations are that the numeric values are
automatically assigned, that a debugger may be able to display the
symbolic values when enumeration variables are examined, and that they
obey block scope. (A compiler may also generate nonfatal warnings when
enumerations are indiscriminately mixed, since doing so can still be
considered bad style even though it is not strictly illegal.) A
disadvantage is that the programmer has little control over those
nonfatal warnings; some programmers also resent not having control over
the sizes of enumeration variables.
my question is
why is it written as sizes of enumeration variables are not under the
control of programmer
after all as per my understanding goes enumerations are integral data
types,so their
size should be less than or equal to that of int isn' t it???