Which of the following about if statement is true? A. The condition is a Boolean expression B. A Boolean expression is something the computer can test whether it is true or not C. If statement is used to implement selection control structure D. All of the above are true

Respuesta :

ijeggs

Answer:

D) All the above are true

Explanation:

consider this code snippet

int age =17;

if(age<18){

 cout<<"You are young"<<endln;

}

else{

 cout<<"You are an adult"<<endln;

}

From this code snippet we see the use of an if statement which is followed by the condition age<18. We can see that this condition can only be true or false that is boolean (Fulfils option A in the question) And we know that a boolean expression is something the computer can test whether it is true or not (fulfills option B). Then finally we have used it to implement a selection control with the combination of an else branch. So all of the options are true

ACCESS MORE
EDU ACCESS