title: what is the role of x = (char *)&a and what does it do?
body: <p>I have this piece of code:</p>
  
  <pre><code>int a;
  char *x;
  x = (char *) &amp;a;
  a = 512;
  x[0] = 1;
  x[1] = 2;
  printf("%d\n");
  return 0;
  </code></pre>
  
  <p>This prints <strong>513</strong>. Please explain and especially line 3.</p>