title: pass by value in C
body: <p>Is the following code portable?</p>
  
  <p>I just pass the pointer by value and I can <em>change</em> it in the caller!</p>
  
  <pre><code>void foo(void *p)
  {
      void **pp = (void**)p;
      *pp = "hahaha";
  }
  
  int main(int argc,char **argv)
  {
      void *p = NULL;
      p = &amp;p;
      printf("%p\n",p);
      foo(p);
      printf("%s\n",(char *)p);     // hahaha
      printf("%p\n",p);
  
      return 0;
  }
  </code></pre>