title: The double pointer points to the int variable to overwrite the memory
body: <p>I put the code directly.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  struct A
  {
      int a;
      int b;
  };
  int main()
  {
      struct A test;
      double *p = (double *)&amp;(test.a);
      *p = 5;
  
      printf("variable a: %d\n", &amp;test.a);
      printf("variable b: %d\n", &amp;test.b);
      return 0;
  }
  </code></pre>
  
  <p>I run this code in centos7, the compiler is <code>gcc4.8.5</code>.And my computer uses little ending to store.</p>
  
  <p>As you see, the memory of variable <code>b</code> will be overwritten, I expected <code>a</code> is <code>0x0000 0005</code> and <code>b</code> is <code>0x0000 0000</code>.</p>
  
  <p>But the answer is:</p>
  
  <pre><code>variable a: 0
  variable b: 1075052544
  </code></pre>
  
  <p>Why variable <code>a</code> is <code>0x 0000 0000</code> and <code>b</code> is <code>0x4014 0000</code>?</p>