-
What are the different ways to initialize an array with all elements as zero?
-
-
int p = 0, q = 0, r = 0;
int array[5] = {p, q, r}; - int array[5] = {};
- int array[5] = {0};
- All of above
- None of these
-
Correct Option: D
Option A, B and C are the different ways to initialize an array with all elements as zero.