Q20
Which of the following correctly declares an array of 10 integers in C++ and initializes all elements to zero?
A.
int arr[10] = {};
B.
int arr[10]; for(int i = 0; i < 10; ++i) arr[i] = 0;
C.
int arr[10] = {0};
AnswerD.
int arr[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board