A, B, and D are incorrect.
A is incorrect because the statement is valid—it is a simple assignment.
B is incorrect because the code segment is valid. It is legal to have more than one variable assigned on a line as seen in the last line of B. The last line of this segment sets a equal to b, and then c equal to a.
D is incorrect because the segment is valid. Because stillRunning is a boolean value, a relational operator is not needed. Note that while this answer is legal and compiles, it may not be what was intended, as relational operators are typically used in if statements.
|