Im trying to pass the array A into the function 'determinant' in order to calculate its determinant. However I keep getting the following error: cannot convert `float (*)[((unsigned int)((int)x))]' to `float (*)[2]' for argument `1' to `float determinant(float (*)[2])'

Here is my code:

#include <stdio.h>

float determinant(float a[2][2]);

main ()

{

int col, row, x=2, y=2;

float A[y][x], B[y],detA;

printf("Enter Matrix A: ");

for(row=0 ; row<y; row++)

{

for(col=0 ; col<x ; col++)

scanf("%f", &A[row][col]);

}

printf("You entered:\n");

for(row=0 ; row<y; row++)

{

for(col=0 ; col<x ; col++)

printf("[%f]", A[row][col]);

putchar('\n');

}

printf("Enter Matrix B: ");

for(row=0 ; row<x; row++)

scanf("%f", &B[row]);

printf("You entered:\n");

for(row=0 ; row<y; row++)

printf("[%f]\n", B[row]);

detA = determinant(A);

printf("%f", detA);

}

/* Calculate determinant of matrix A */

float determinant(float a[2][2])

{

float det;

det = a[0][0]*a[1][1] - a[0][1]*a[1][0];

return det;

}

Im editing and compiling using Dev-C++ 4.9.9.2

Any help would be great, Thanks.