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...

When creating a query in Design view, the screen displays in two parts - the query design workspace and the ________

A) description grid B) design grid C) form grid D) report grid

Computer Science & Information Technology

Please download the code provided at the exercise portal. It contains a partial implementation of the Sudoku game. Your task is to improve the implementation using patterns.

Implementation of patterns Check if there are any fields left that contain zeroes o Check every column of the puzzle if there are duplicate numbers o Check every row of the puzzle if there are duplicate numbers o Check every box of the puzzle if there are duplicate numbers 2. Think of an alternative implementation of the class SudokuBoard and implement it. Use the Abstract Factory pattern to create a class that instantiates the SudokuBoard implementation of your choice. 3. Add a new button to the game panel that triggers completion of a partially completed puzzle. That is, the user can input some numbers (maybe typing in the puzzle from a newspaper) and let an algorithm complete it. We want you to use the provided implementation of SudokuBoard in this case. That leads to the following problem: Our implementation of a Sudoku solver needs an array of integers as input, but SudokuBoard has no method with matching output. Use the Adapter pattern to provide an adapter that deals with that problem.

Computer Science & Information Technology