title: What is the point behind unions in C?
body: <p>I'm going through O'Reilly's Practical C Programming book, and having read the K&amp;R book on the C programming language, and I am really having trouble grasping the concept behind unions. </p>
  
  <p>They take the size of the largest data type that makes them up...and the most recently assigned one overwrites the rest...but why not just use / free memory as needed?</p>
  
  <p>The book mentions that it's used in communication, where you need to set flags of the same size; and on a googled website, that it can eliminate odd-sized memory chunks...but is it of any use in a modern, non-embedded memory space?</p>
  
  <p>Is there something crafty you can do with it and CPU registers? Is it simply a hold over from an earlier era of programming? Or does it, like the infamous goto, still have some powerful use (possibly in tight memory spaces) that makes it worth keeping around?</p>