This is my first time writing in C and I'm trying to compile and run a program in C that is supposedly standard code for dense matrix multiplication. However i'm getting this segmentation fault (core dumped) error and i have no idea what the problem is. Here is my code:

Code:int main(){ int N = 1024; int x[N][N]; int y[N][N]; int z[N][N]; int i; int r; int k; int j; for (i = 0; i < N; i = i+1) { for (j = 0; j < N; j = j+1) {r = 0; for (k = 0; k < N; k = k+1){ r = r + y[i][k]*z[k][j];}; x[i][j] = r; }; }; return 0; }