If the following code fragment is executed in an otherwise complete and correct program, which expression will be executed? Why?
```
x = 0;
if (x = 12)
yes_statement;
else
no_statement;
```
a) The no_statement will be executed because x is not 12.
b) The statement has incorrect syntax so will not compile at all.
c) x=12 is illegal in the Boolean expression of an if statement.
d) The yes_statement will be executed.
d) The yes_statement will be executed.
The expression x = 12 has the value 12, which is converted to true, causing the if always to execute the yes_statement.
You might also like to view...
Name three pieces of information you frequently need to provide the installation software during an OS installation.
What will be an ideal response?
What happens if you try to upgrade a package and RPM finds a newer version installed on the system?
A. An error results. B. A prompt appears asking if you want to continue. C. RPM overwrites the newer version with the upgrade package. D. RPM reinstalls the newer version using it's configuration file.