Solved

Which of the Following Does Not Declare a 2-By-2 Array

Question 15

Multiple Choice

Which of the following does not declare a 2-by-2 array and set all four of its elements to 0?


A) array<array<int,2>, 2> b; b[0][0] = b[0][1] = b[1][0] = b[1][1] = 0;
B) array<array<int, 2>, 2> b = {0};
C) array<array<int, 2>, 2> b; for (auto const &row : b) {
For (auto &element : row) {
Element = 0;
}
}
D) All of the above initialize all four of the array elements to 0.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions