Solved

If the Following Code Fragment Is Executed in an Otherwise

Question 6

Multiple Choice

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.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions