hi, i have a problem with pointers. I have declared a matrix that receives n x m lines and columns, but I receive a fault segment and I do not know why .. can you help me please?

Code:

#include <stdio.h>
#include <stdlib.h>
int main(int **matrix, int matrixSize) {
int i,j,temp;
printf("%s","Enter size of matrix:");
scanf("%d",&matrixSize);
printf("%s","Enter matrix elements\n");
for(i=0;i<matrixSize;i++) {
for(j=0;j<matrixSize;j++) {
scanf("%d",&matrix[i][j]);
}
}
for(i=0; i<matrixSize/2; i++) {
for(j=i; j<matrixSize-i-1; j++) {
temp = matrix[i][j];
matrix[i][j] = matrix[j][matrixSize-1-i];
matrix[j][matrixSize-1-i] = matrix[matrixSize-1-i][matrixSize-1-j];
matrix[matrixSize-1-i][matrixSize-1-j] = matrix[matrixSize-1-j][i];
matrix[matrixSize-1-j][i] = temp;
}
}
for(i=0;i<matrixSize;i++) {
for(j=0;j<matrixSize;j++) {
printf("%d ",matrix[i][j]);}
printf("%s","\n");
}
return 0;
}