To fix the printArray
function you will need to include the array dimensions. In C, arrays are simply a block of elements, there is no length stored anywhere. The programmer would need to keep track of the length by some method.
For example:
// header
void printArray(int num, int arr[num][num]);
// source file
void printArray(int num, int arr[num][num])
{
for(int i=0;i
For the multiplication
function you will need to do something similar, the caller should allocate the array (e.g. int arr[num][num];
) and then the function should fill in the values for the array cells.