title: Dereferencing a double pointer
body: <p>I have code snippet that I can't understand how it works, because of one line that does a double dereference. The code looks like this:</p>
  
  <pre><code>void afunction(int**x){
      *x = malloc(2 * sizeof(int));
      **x = 12;
      *(*x + 1) = 13;
  }
  
  int main(){
      int *v = 10;
      afunction(&amp;v);
  
      printf("%d %d\n", v[0], v[1]);
      return 1;
  }
  </code></pre>
  
  <p>I understand that the first element of the pointer to pointer gets the value 12, but the line after that I just can't seem to understand. Does the second element in the first pointer get value 13?</p>