Question

Which of the following does not initialize all of the array elements to 0?
(a)
int b[2][2];
b[0][0] = b[0][1] = b[1][0] = b[1][1] = 0;
(b) int b[2][2] = {0};
(c)
int b[2][2];
for (int i = 0; i < 2; ++i) {
for (int j = 0; j < 2; ++j) {
b[i][j] = 0;
}
}
(d) all of the above initialize all of their elements to 0.

Answer

This answer is hidden. It contains 3 characters.