ProgrammingModerate
A matrix multiplication of a 3 x 4 matrix by a 4 x 2 matrix produces a result of what size?
- A. 4 x 4
- B. 3 x 2
- C. 3 x 4
- D. 2 x 4
Correct answer: B. 3 x 2
The result takes the rows of the first matrix and the columns of the second, giving 3 x 2.
More C Programming questions
- How many scalar multiplications does the naive method use for a 3 x 4 times 4 x 2 product?
- A tic-tac-toe board stored as char b[3][3] is full. What is the minimum number of moves that could have been made on it?
- The function void zero(int n, int m[][n]) assigns zero to all cells. Which loop is correct for n x n data?
- A 2D array is stored in memory and read in column-major order by mistake in a C program. What is the main consequence?
- The sum of i + j over all cells of a 3 x 3 grid with indices 0 to 2 is what?
- Which declaration creates a 3 x 3 identity matrix with C99 designators?