Question

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.

Answer

This answer is hidden. It contains 54 characters.