Multiple Choice
Consider the code segment below.
if (gender == 1) {
If (age >= 65) {
++seniorFemales;
}
}
This segment is equivalent to which of the following?
A) if (gender == 1 || age >= 65) { ++seniorFemales;
}
B) if (gender == 1 && age >= 65) { ++seniorFemales;
}
C) if (gender == 1 AND age >= 65) { ++seniorFemales;
}
D) if (gender == 1 OR age >= 65) { ++seniorFemales;
}
Correct Answer:

Verified
Correct Answer:
Verified
Q4: For the code segment below:<br> switch(q) {<br>Case
Q5: Suppose variable gender contains MALE and age
Q6: Which statement prints the floating-point value 123.456
Q7: Which of the following statements about a
Q8: Which of the following can be used
Q10: Which of the following for-loop headers results
Q11: Which case of the following would warrant
Q12: Which of the following statements about the
Q13: Which of the following is not a
Q14: Which formatting flag indicates that the floating-point