I need to fill 2-d array with 0s. But compiled program falls with this error. What's wrong?
int main()
{
int vert[1001][1001];
int hor[1001][1001];
int dudiag[1416][1416];
int uddiag[1416][1416];
int n, k, m;
int row, col;
int i, j;
int answer = 0;
for(i = 0; i <= 1000; i++){
for(j = 0; j <= 1000; j++){
vert[i][j] = 0;
hor[i][j] = 0;
}
}
...
}
When cycle is commented out, it works properly.