Multiple Choice
Consider the following code that will assign a letter grade of 'A', 'B', 'C', 'D', or 'F' depending on a student's test score. if (score >= 90) grade = 'A';
If (score >= 80) grade = 'B';
If (score >= 70) grade = 'C';
If (score >= 60) grade = 'D';
Else grade = 'F';
A) This code will work correctly in all cases.
B) This code will work correctly only if the grade is greater than or equal to 60.
C) This code will work correctly only if the grade is less than 60.
D) This code will work correctly only if the grade is less than 70.
E) This code will not work correctly under any circumstances.
Correct Answer:

Verified
Correct Answer:
Verified
Q24: Rewrite the following set of if statements
Q25: In Java, selection statements consist only of
Q26: What is wrong, logically, with the following
Q27: Consider the following outline of a nested
Q28: The statement {} is a legal block.
Q30: Explain what is meant by short circuiting
Q31: Assume that boolean done = false, int
Q32: Assume that x and y are int
Q33: Regarding the Software Failure: The operators were
Q34: Code Segment Ch 05-1<br>if (a > 0)<br>