title: Using a 2D Array in Function: Error
body: <p>I tried to set values in 2D array and Print it with Function.</p>
  
  <p>but I got trouble to send the Array to the Function.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void SetArr(int (*arr)[], int n);
  void PrintfArr(int (*arr)[], int n);
  
  int main()
  { 
      int arr[100][100];
  
      for(int i=0; i&lt;100; i++)
          for(int j=0; i&lt;100; j++)
              arr[i][j]=0;         //initiallize Array
  
       int size;
  
      printf("input Size : "); scanf("%d", &amp;size);
  
      SetArr(arr, size);
      PrintfArr(arr, size);
  
      return 0;
  }
  
  void SetArr(int (*arr)[], int n)
  {
     int i, j;
  
      for(i=0; i&lt;n; i++)
     {
         for(j=0; j&lt;n; j++)
              arr[i][j]=i+j;    // Error! "Subscript of Pointer to imcomplete~
     }
  }
  
  void PrintArr(int (*arr)[], int n)
  {
     int i, j;
  
     for(i=0; i&lt;n; i++)
     {
         for(j=0; j&lt;n; j++)
             printf("%d", arr[i][i]);  // Error! "Subscript of Pointer to imcomplete~
     }
     printf("\n");
  }
  </code></pre>
  
  <p>As you see, both of functions got same problem while using "arr[][]"</p>