Which code fragment below fills an M ? N matrix with the products of corresponding elements of M ? N matrices p and q?

a. m = p * q;
b. for ( int i = M; i < N; ++i )
m[i] = p[i] * q[i];
c. for ( int i = 0; i < M; ++i )
for ( int j = 0; j < N; ++j )
m[i][j] = p[i][j] * q[i][j];
d. for ( int i = 0; i < M; ++i )
for ( int j = i; j < N; ++j )
m[j][i] = p[j][i] * q[j][i];


c. for ( int i = 0; i < M; ++i )
for ( int j = 0; j < N; ++j )
m[i][j] = p[i][j] * q[i][j];

Computer Science & Information Technology

You might also like to view...

Which of the following statements about searching algorithms and their efficiency is false?

a. The major difference between various searching algorithms is the amount of effort they require to complete the search. b. Big O notation is one way to describe how likely it is that a searching algorithm will find its target. c. The effort required to perform a search or a sort is particularly dependent on the number of data elements. d. A more efficient searching algorithm is usually more complex and difficult to implement.

Computer Science & Information Technology

Software that pretends your computer is infected with a virus to entice you into spending money on a solution is known as

a. scareware. c. adware. b. spyware. d. trackingware.

Computer Science & Information Technology

PHP allows you to store cookie values in indexed or associative ____.

A. functions B. text files C. arrays D. scripts

Computer Science & Information Technology

The ____ method of a control will cause the focus on the screen to move to that control.

A. Focus B. GoTo C. HighLight D. Select

Computer Science & Information Technology