title: Pointer doesn't return the right value
body: <pre><code>#include &lt;stdio.h&gt;
  
  void readMatrix(int*a,int*b){
      int r,c;
      scanf("%d%d",&amp;r,&amp;c);
      a = &amp;r;
      b = &amp;c;
  
  
  }
  
  main(){
  
      int a,b;
      readMatrix(&amp;a,&amp;b);
      printf("%d\n%d",a,b);
  }
  </code></pre>
  
  <p>When i run it and insert values 1 and 2 and print the a,b variables in main 1697527160 and 1700556911. I know that i could simply scan the a,b values in main but what's the fault in my code?</p>