title: Unions versus structures in C
body: <p>The idea behind this question is to understand the deeper concepts of using union and using it in different way so as to save memory.. My question to all is--</p>
  
  <p>let's say there is a structure</p>
  
  <pre><code>struct strt
  {
     float f;
     char c;
     int a;
  }
  </code></pre>
  
  <p>and the same structure represented in union </p>
  
  <pre><code>union unin
  {
     float f;
     char c;
     int a;
  }
  </code></pre>
  
  <p>If I allocate values to structure members one after another and then print them, it gets
  printed. But in case of union it doesn't happen, some overwriting is being done..</p>
  
  <p>So I need to find out a method which can store the values of f,c,a using union and then I can print the same. (Apply any operations or anything..) but I am in search of this technique.. Can anybody out there guide me or give me any idea?</p>