I know 'enum' data type is a user defined data type, and the 'enum' variables are the size of 'int'.
- The above 'identifier' is a set of constant values, which have a alias name for the constant values, how are these values stored in the memory? i mean how is 'value1' stored i.e '0', and 'value2' stored i.e '20', and 'value3' stored i.e '7000', and 'value4' stored i.e '1234567' in the memory.
I know that the 'enum_variable' has a size of 32 bits, not mandatory. But the confusion part here is that how can 32 bits [if] collectively store all the 'enum' values?
enum identifier { value1 = 0, value2 = 20, value3 = 7000, value4 = 1234567 } enum_variable; printf("%d\n",sizeof(enum_variable));