ProgrammingModerate

Which statement about matrix multiplication in C is correct for an m x k matrix times a k x n matrix?

  1. A. The product is k x k regardless of m and n
  2. B. The product is m x k and needs only m x n multiplications
  3. C. The product is m x n and requires m x n x k multiplications with the naive method
  4. D. The product exists whenever m equals n

Correct answer: C. The product is m x n and requires m x n x k multiplications with the naive method

The inner dimension k is summed out, leaving m x n results, each needing k multiplications. So the naive method does m x n x k multiplications.

More C Programming questions

Exams that ask this topic