title: how to pass one pointer value to another pointer?like can I do int *a=*b;where b is defined already but the pointer a is not addressing to any integer
body: <p>Actually I was reading about pointers and wanted to try something ,so I wrote a small code</p>
  <pre><code>int main(){
      int x = 10;
     int *ptr;
      ptr = &amp;x;                   
      printf(&quot;%d is stored at address %d\n&quot;,x,ptr );
      int *c=*ptr;
      c=&amp;ptr;
     printf(&quot;location is %d\n&quot;,c);
   printf(&quot;value of c= %d&quot;,*c);
  }
  </code></pre>
  <p>the result I expected was value  of c would be 10  but instead the value came as the location of x.
  output:<code> 10 is stored at address 997523644 location is 997523648 value of c= 997523644</code></p>
  <p>does this problem arise because I didnt pass any location as first?or is it something else or my question is quite silly I know:D,Can anyone help me?</p>