title: Reason of error on pointer de-referencing
body: <p>Output is: <code>10</code> and it gives no error.</p>
  
  <pre><code>int main(){
      int j=10;
      int *i=&amp;j;
      printf("%d",*i);
      return 0;
  }
  </code></pre>
  
  <p>but it gives me an error:</p>
  
  <pre><code>int main(){
  int *i;
  int j=10;
  *i=&amp;j;
  printf("%d",*i);
  return 0;
  }
  </code></pre>
  
  <p>I understand that pointer de-referencing is causing the error. But how is that happening?</p>