I have 2 things
- first, the function prototype
void matrixMultiply(int a[][2000], int b[][2000], int c[][2000]);
and the function declaration
void matrixMultiply(int matrix1[2000][2000], int matrix2[2000][2000], int pM[2000][2000]){
do not match.
May be not an error, but I always found a good habit to have both match. It have avoided a couple headache in the past :)
when you will have solved your segment problem, you will run into another one.
the sum of 2000 products of random integers will never fit into an integer.
The problem is so huge that you have little chances to get a single sum correct over the 4000000 sums.