title: Passing 3D array as parameter to a function in C
body: <p>Im trying to write a function that sums the elements of a 3d array, however it keeps saying there is a problem with the lines where I pass the 3d array as a parameter. My code is as follows:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int sum3darray(a[][][], size);
  
  main() {
      int check[3][3][3]={ 0 };
      int size=3;
      printf("The sum is %d\n",sum3darray(check,size));
  }
  
  int sum3darray(a[][][],size) {
      int i,j,k,sum=0;
          for(i=0;i&lt;size;i++) {
              for(j=0;j&lt;size;j++) {
                  for(k=0;k&lt;size;k++) {
                      printf("i=%d, j=%d,k=%d, checkijk=%d  ",i,j,k,check[i][j][k]);
                      sum+=check[i][j][k];
                      printf("sum=%d\n", sum);
                  }
              }
          }
  return(sum);
  }
  </code></pre>
  
  <p>The compiler flags lines 3 and 11 as problems. Can anyone help?      </p>