title: Changing the pointer inside a function does not reflect outside the function
body: <pre><code>void alloco(int *ppa)
  {
      int i;
      printf("inside alloco %d\n",ppa);
      ppa = (int *)malloc(20);
      ppa[15] = 9;
      printf("size of a %d \n", sizeof(ppa));
      for(i=0;i&lt;20;i++)
      printf("a[%d] = %d \n", i, ppa[i]);
  }
  
  int main()
  {
      int *app = NULL;
      int i;
      printf("inside main\n");
      alloco(app);
      for(i=0;i&lt;20;i++)
      printf("app[%d] = %d \n", i, app[i]);
      return(0);
  }
  </code></pre>
  
  <p>Basically all I wanted to do is to pass a null pointer from my <code>main</code> to a function(<code>alloco</code>) which allocates memory/fills the same location the pointer is pointing to and returns. I am getting local prints correctly that is inside function(<code>alloco</code>) but not in <code>main</code>.</p>
  
  <p>Am I doing anything wrong here? </p>