ProgrammingModerate

Which 2 x 2 product gives the top-left entry of A = [[1, 2], [3, 4]] times B = [[5, 6], [7, 8]]?

  1. A. 23
  2. B. 17
  3. C. 19
  4. D. 5

Correct answer: C. 19

The top-left entry is row 0 of A dotted with column 0 of B: 1 x 5 + 2 x 7 = 19. 17 wrongly uses row 0 of B (1 x 5 + 2 x 6), and 5 multiplies only the corner entries.

More C Programming questions

Exams that ask this topic