Answer:
C) True
Explanation:
To see why this evaluates to "True" let's see this line of code in C++
#include <iostream>
using namespace std;
int main()
{
int intQuantity = 3;
int decPrice = 15.75;
if (intQuantity >0 && intQuantity <10 || decPrice>20){
cout<<"True";
}
else{
cout<<"False";
}
return 0;
}
The output from this program will be "True" because the condition if (intQuantity >0 && intQuantity <10 || decPrice>20) evaluates to true. The reason is because in programming the Logical Or ( | | ) evalutes to true when one or both conditions are true. In the question, although the condition decPrice>20 is not true, the first condition intQuantity >0 && intQuantity <10 is true, so the OR evaluates to true.