10. Which of the following for loops will print the column whose subscript is 1 in order (i.e.
from top to bottom)
A. for (int J = 0; J < 5; J++)
cout << MyArray[J][1] << ‘ ‘;
B. for (int J = 4; J >= 0; J—)
cout << MyArray[J][1] << ‘ ‘;
C. for (int J = 4; J >= 0; J—)
cout << MyArray[1][J] << ‘ ‘;
D. for (int J = 0; J < 5; J++
cout << MyArray[1][J] << ‘ ‘;
11. Given the two-dimensional array declared by the following statement
int myArray[4][3] = {{2,4,6},{1,8,10},{3,5,7},[9,11,13}};
what is the value of myArray[1][2]
A. 4
B. 5
C. 8
D. 10
12. Which of the following is the formula for the determinant of a two by two matrix?
A. A1 1 * A1 2 – A 2 1 * A2 2
B. A1 1 * A2 2 – A 1 2 * A2 1
C. A1 1 * A1 2 + A 2 1 * A2 2
D. A1 1 * A2 2 + A 1 2 * A2 1
13. When calculating the product of two matrices (A x B) where the following declarations
define the size of A and B, which of the declarations correctly defines matrix C to hold the
result.
double A[3][4], B[4][2];
A. double C[4][4];
B. double C[3][4];
C. double C[4][2];
D. double C[3][2];
E. The product A x B can not be computed.
14. Which of the following lines represent the same line as the equation 2y + 6x = 12
A. 2 – x = y
B. y -6 = 3x
C. 6 = 3x + y
D. None of the above are the same line as the given equation
15. The first subscript in a two-dimensional array in C++ refers to the number of columns.
A. True
B. False
16. When calculating the sum of two matrices (Matrix Addition) the two matrices must be square
matrices, i.e. the number of row is the same as the number of columns?
A. True
B. False