0

Hi could someone tell me how to pass a dynamic matrix to a function? Or where I have gone wrong? Thanks for the help!

for example:

```
void main()
{
int R,C; /* r=rows, c=columns/*
double *A; /* A is the matrix/*
/* I dynamically allocate my matrix (not too sure if correct)*/
double *A = malloc(R * C * sizeof(double));
/* assuming i have a function that calculates the determinant */
determinant(A,R,C);
/* and free it later*/
free(A);
}
void determinant(double *matrix, int r, int c)
```

have I passed the dynamic matrix to the function determinant correctly?