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

Computer Science & Information Technology

You might also like to view...

Given the following class, what would be the best declaration for a mutator function that allows the user of the class to change the age?

class Wine { public: Wine(); int getAge(); float getCost(); private: int age; float cost; } a. int getAge(int newAge); b. Wine(); c. void setAge(); d. void setAge(int newAge);

Computer Science & Information Technology

The recursive definition of a Fibonacci Number is F(n) = F(n-1) + F(n-2), where F(0)=1 and F(1)=1. What would be the recursive function call in a recursive implementation of this?

a. return; b. return fib(n) + fib(n-1) c. return fib(n-1)+fib(n-2) d. return 1;

Computer Science & Information Technology

In Access, when you click the Advanced Filter/Sort button, a list of all the field names is displayed

Indicate whether the statement is true or false

Computer Science & Information Technology

How do you know how many bits represent the network portion and how many bits represent the host portion?

What will be an ideal response?

Computer Science & Information Technology