Here are several different initializations of a structure variable. State what happens in each initialization.
```
struct WeatherData
{
int temperature;
int windChill;
int windSpeed;
};
```
a) WeatherData prediction ={ };
b) WeatherData prediction ={40};
c) WeatherData prediction ={40, -10, };
d) x WeatherData prediction ={40, -10, 20 };
a) All the structure members are set to 0.
b) temperature is set to 40, the other two variables are set to zero.
c) temperature is set to 40, windChill is set to –10, and windSpeed is set to 0
d) temperature is set to 40, windChill is set to –10, and windSpeed is set to 20
If there is an initializer list and a member is missing an initializer, that member is set to a zero appropriate to the type. a) The issue here is whether the empty initializer list is allowed. They are permitted for structs (but not for arrays), so all the structure members are set to 0. For b) and c), the members missing initializers are set to 0. In d), all members are set to the corresponding member of the initializer list.
You might also like to view...
Storing the options used in a lookup field in a separate table makes adding options easier
Indicate whether the statement is true or false
The frames per second indicates the frame ____, or how many frames will display in one second when the animation is played.
A. status B. progress C. speed D. rate
Will changing a layer's blending mode to Lighten remove a dark
background as it blends? What will be an ideal response?
To edit a header, double-click in the header section of the document and make the edits.
Answer the following statement true (T) or false (F)