Nov 11, 2010 #1 S Sudarsan_EDA Member level 2 Joined Jun 10, 2010 Messages 44 Helped 11 Reputation 22 Reaction score 11 Trophy points 1,288 Location India Activity points 1,523 Hi to all, How to find Size of Enumerators variable? I am using Kiel compiler for compiling "C" code.
Hi to all, How to find Size of Enumerators variable? I am using Kiel compiler for compiling "C" code.
Nov 11, 2010 #2 kalbun Full Member level 2 Joined Oct 2, 2010 Messages 134 Helped 37 Reputation 74 Reaction score 36 Trophy points 1,318 Location Firenze, Italy Activity points 2,114 typedef enum { pop1, pop2, pop3 } epop; int main(void) { return sizeof(epop); }
Nov 19, 2010 #3 M magarwal Newbie level 5 Joined Nov 17, 2010 Messages 10 Helped 4 Reputation 8 Reaction score 4 Trophy points 1,283 Location Bangalore Activity points 1,325 Hi Sudarsan_EDA, the compiler manual/user guide might have the right information regarding this.
Nov 19, 2010 #4 S Sink0 Full Member level 6 Joined Nov 25, 2009 Messages 390 Helped 37 Reputation 74 Reaction score 30 Trophy points 1,308 Location Sao Paulo, Brazil Activity points 4,186 As far as i remember a enum is an integer, so have the same size as an integer (what is up to your compiler) but i might be wrong.
As far as i remember a enum is an integer, so have the same size as an integer (what is up to your compiler) but i might be wrong.