title: Passing pointer to function value not changing
body: <pre><code>#include&lt;stdio.h&gt;
  
  void foo(int*);
  int main()
  {
      int i = 97, *p = &amp;i;
      foo(p);
      printf("%d ", *p);
      getch();
  }
  
  void foo(int *p)
  {
      int j = 2;
      p = &amp;j;
      printf("%d ", *p);
  }
  </code></pre>
  
  <p>Output is 2 97
  Why not 2 2 ?
  pointer p holds the address of j now so why 97 is printed ?</p>