title: Memory allocation to a char*
body: <p>I would like to understand why this piece of code will not crash :</p>
  
  <pre><code>#include&lt;studio.h&gt;
  #include&lt;string.h&gt;
  main()
  {
      char *a;
      a=(char *)malloc(1);
      strcpy(a, "example");
  }
  </code></pre>
  
  <p>I though we are writing to memory that is not the processes' since we allocate only 1 byte for the char * and we write more than that.</p>
  
  <p>Can somebody please explain?</p>
  
  <p>Thanks in advance.</p>