title: function that calculate Size of Structure without padding bytes
body: <p>Hi i want to make a function which calculate the size of structure without padding bytes.</p>
  
  <p>Example :</p>
  
  <pre><code>struct test{
      int   x;
      char  y;
      int   z;
  };
  </code></pre>
  
  <p>If i calculate the size of above structure i must get 9 byte (i.e. without padding bytes)</p>
  
  <p>And consider the case where i might not know the variable present in struct.</p>
  
  <p>Example :</p>
  
  <pre><code>struct test{
      int   x;
      ....
      ....
      ....
      int   z;
  };
  </code></pre>
  
  <p>so if i calculate the size it should give correct size.</p>
  
  <p>Is it possible do write such function?I tried reading on structure's but i dint find any solution.I saw there is some compiler option are present from that i can get but i dont want any in build compiler option.</p>