title: parameter passing / return of function arrays in C,
body: <p>I'm having a problem with my schooljob where I have to do in C, which consists of, get the inverse array through the enclosed array. Every time I try to call a function that have a array as parameter, that error apear "Row 37 [Error] incompatible type for argument 2 of 'Invertible'". </p>
  
  <p>So far this is what I could produce in C# and then I tried to rewrite it in C, but I'm not getting success because I do not know the language.</p>
  
  <p>I'm using DEV C++ to compile my code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;math.h&gt;
  
  int mult = 0;
  /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  float detLaplace(int n, float a[n][n]);
  float det2(float array[2][2]);
  float det3(float array[3][3]);
  float * cafactor(int n, float array[n][n], int Row,int Column);
  float * matcafactor(int n, float a[n][n]){
  float * Transpose(int n, float array[n][n]);
  float * Adjugate  (int n, float array[n][n]);
  float * Invertible (int n, float array[n][n]);
  
  //MAIN #TODO
  int * main(int argc, char *argv[]) {
  
      int l;
      int c;
      int o;
      float v;
  
      printf("Insert the array order: ");
      scanf("%d\n",&amp;o);
  
      static float array[100][100];
  
      for(l=0;l&lt;o;l++){
          for(c=0;c&lt;o;c++){
              printf("\nInsert Cell value[%i][%i]: ",&amp;l,&amp;c);
              scanf("%d",&amp;v);
          }
              printf("\n");
      }   
  
      array = Invertible (o,array[100][100]);
  
      int op = 0
      for(l=o;o&gt;0;o--){
          op=op+(l*l);
      }
  
      printf("\nOperation numbers=%d |",&amp;op);
  
      printf("\narray Invertible :\n |");
  
      for(l=0;l&lt;o;l++){
          for(c=0;c&lt;o;c++){
              printf("%d |",&amp;array[l][c]);
          }
              printf("\n");
      }   
  
      return 0;
  }
  
  
  
  
  
  /*
      |-------------------|
      |   FUNCTIONS       |
      |-------------------|
  */
  
  //LAPLACE
  float detLaplace(int n, float a[n][n]){
  
      if(n == 1){
          // array 1x1
          return a[0][0];
      }
      else{
          float det = 0;
          int i, row, col, j_aux, i_aux;
  
          //Select first line to calculate the cofactors
          for(i = 0; i &lt; n; i++){
              //ignore the zeros (zero time anything equal zero)
              if (a[0][i] != 0) {
                  float aux[n - 1][n - 1];
                  i_aux = 0;
                  j_aux = 0;
                  //Generate the array to calculate the cofactors
                  for(row = 1; row &lt; n; row++){
                      for(col = 0; col &lt; n; col++){
                          if(col != i){
                              aux[i_aux][j_aux] = a[row][col];
                              j_aux++;
                          }
                      }
                      i_aux++;
                      j_aux = 0;
                  }
                  float factor = (i % 2 == 0)? a[0][i] : -a[0][i];
                  det = det + factor * detLaplace(n - 1, aux);
              }
          }
          return det;
      }
  }
  
  //Generate cofactor array
  float * matcafactor(int n, float a[n][n]){
      static float matCof[n][n];
      float aux[n - 1][n - 1];    
      float det = 0;
      int i, row, col, j_aux, i_aux;
  
      for(i = 0; i &lt; n; i++){
          i_aux = 0;
          j_aux = 0;
              //Generate the array to calculate the cofactors
          for(row = 1; row &lt; n; row++){
              for(col = 0; col &lt; n; col++){
                  if(col != i){
                      aux[i_aux][j_aux] = a[row][col];
                      j_aux++;
                  }
              }
              i_aux++;
              j_aux = 0;
          }
             float factor = (i % 2 == 0)? a[0][i] : -a[0][i];
             matCof[i][n] = factor * detLaplace(n - 1, aux);
      }
      //Return the cofactor array https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSWQrcWYyqWK9wUGoUS9bnaGn5iCmj6CD9016BF0jopfcg4Xsme
      return matCof;
  }
  
  //Transpose the array
  float * Transpose(int n, float array[n][n]){
  
      int Row=0;
      int Column=0;
      static float[n][n] matTramp;
  
      for(Row&lt; D,Row++){
          for(Column&lt; D,Column++){
              matTramp[Column,Row] = array[Row,Column];
          }
      }
  
      //Return the Transpose the array
      return matTramp;
  }
  
  float * Adjugate  (int n, float array[n][n]){
      static float matAux[n][n];
  
      matAux = matcafactor(n,array[n][n]);    
      matAux = Transpose(n,matAux[n][n]);
  
      //return the Transpose cafactors array 
      return matAux;
  }
  
  float * Invertible (int n, float array[n][n]){
      static float matAux[n][n];
      float detPrincipal=0;
      int i;
      int j;
  
      //Get the determinant of the main array detPrincipal= mainDertminant
      detPrincipal = detLaplace(n, array[n][n]);  
  
      matAux = Adjugate (n,array[n][n]);  
  
      for(i = 0, i&lt;n,i++){
          for(j = 0, i&lt;n,i++){
              matAux[n][n] = matAux[n][n]*(1/detPrincipal);
          }
      }
  
      return matAux;
  }
  </code></pre>