title: Pointer and address issue in C
body: <p>Suppose that in the main function an int type varaible x has a value 20. IF the function is called 2 times as foo(&amp;x) , whats the value of x?</p>
  <pre><code>#include&lt;stdio.h&gt; 
  void foo(int *n)
  { 
  int *m;
  m = (int *)malloc(sizeof(int));
  *m = 10;
  *m = (*m)*5;
  n = m;
  }
  int main() 
  {
      int x = 20;
      foo(&amp;x);
      printf(&quot;%d&quot;,x);
  } 
  </code></pre>
  <p>Shouldn't the value of x be 50 since we are initializing the address of n with m which has the value 50 but its coming out to be 20?</p>