void mat_mul(complex** a, complex** b, complex** c, int n, int m, int l)
というように変更し、2をnなりmなりlに置き換えてください。
print_mat()に関しても同様に修正してください。