title: integer pointer is not working while assigning two dimensional array via another pointer?
body: <p>I was trying to copy the contents of one 2d array to another using pointers. I wrote this simple test program but it shows me segmentation fault but i still cannot find a rock solid reason why?</p>
  
  <pre><code>    #include &lt;stdio.h&gt;
  
      void main(){
      int m[2][3]={
              {2,3,4},{5,6,7}
      };
  
      int *p=m;
      int *n;
  
      int i,j;
  
      for(i=0;i&lt;2;i++){
          for(j=0;j&lt;3;j++){
              printf("%d \t", *(p+3*i+j));
              printf("Debug here\n");
              *(n+3*i+j)=*(p+3*i+j);
          }
  
          printf("\n");
      }
  }
  
  // Output:
  // 2    Debug here
  // Segmentation fault (core dumped)
  </code></pre>