title: Is the sizeof(enum) == sizeof(int), always?
body: <p>Is the sizeof(enum) == sizeof(int), always ?</p>
  
  <ul>
  <li>Or is it compiler dependent?</li>
  <li>Is it wrong to say, as compiler are optimized for word lengths (memory alignment) ie y int is the word-size on a particular compiler? Does it means that there is no processing penalty if I use enums, as they would be word aligned?</li>
  <li>Is it not better if I put all the return codes in an enum, as i clearly do not worry about the values it get, only the names while checking the return types. If this is the case wont #DEFINE be better as it would save memory.</li>
  </ul>
  
  <p>What is the usual practice?
  If I have to transport these return types over a network and some processing has to be done at the other end, what would you prefer enums/#defines/ const ints.</p>
  
  <p>EDIT - Just checking on net, as complier don't symbolically link macros, how do people debug then, compare the integer value with the header file?</p>
  
  <p>From Answers —I am adding this line below, as I need clarifications—</p>
  
  <blockquote>
    <p>"So it is implementation-defined, and
    sizeof(enum) <strong>might be</strong> equal to
    sizeof(char), i.e. 1."</p>
  </blockquote>
  
  <ul>
  <li>Does it not mean that compiler checks for the range of values in enums, and then assign memory. I don't think so, of course I don't know. Can someone please explain me what is "might be".</li>
  </ul>