Answer the following statements true (T) or false (F)

1) The first element of the 4 × 3 × 5 matrix named mat1 is referenced in C++ as mat1[0, 0, 0].
2) In memory, C++ stores the first element of the second column of a two-dimensional array immediately after the
last element of the first column.
3) When declaring a multidimensional array in C++, the dimensions may be integer constants, integer parameters,
or any other integer expressions.
4) This code fragment will display an M ? N matrix a column at a time.

```
for (c = 0; c < N; ++c) {
for (r = 0; r < M; ++r)
cout << setw( 5 ) << matrix[r][c];
cout << endl;
}
```
5) If mat is a 4 ? 5 matrix, and p = 2 and q = 3, then this is a valid reference to an element of mat:
mat[q][p * q - 4]

1) F
2) F
3) F
4) T
5) T

Computer Science & Information Technology

You might also like to view...

________ are database objects that provide a method of automating repetitive tasks within an Access database

Fill in the blank(s) with correct word

Computer Science & Information Technology

Permanent storage that does not lose contents when a computer loses power is known as what type of storage?

A. volatile B. temporal C. nonvolatile D. soft storage

Computer Science & Information Technology