Question: If I have an array of doubles, such as `static double arr[10];` and I'd like to initialize all of the values in the array to `0`, I do:

```
1 for (int i = 0; i < 10; i++)
2    arr[i] = 0;

```

**My question:**

Is line 2 correct, or do I need to initialize to `0.0`? What's the difference?

Answer: 
Yes. `arr[i] = 0;` is correct. `0` will be implicitly converted to `double` type.
There are no uninitialized variables with `static` storage duration. Zero initialized static data is stored in the `BSS` section and data uninitialized in the program is initialized to `0` and then stored in the `BSS` section.

So you are not required to explicitly initiate your **static** array of doubles.

Your code of `arr[i] = 0` is correct since the `int` will be automatically promoted to a `double`.

But I would recommend for better readability, you initialize the array as follows:

```
static double arr[10] = {0.0};

```