CBSE Class 11 Computer Science
Question 3 of 80
Conditional and Looping Constructs — Question 3
Back to all questions 3
Question Assertion (A): In an if-else statement, the if block checks the true part whereas the else checks for the false part.
Reasoning (R): if-else is a conditional construct where else block is mandatory.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
A is true but R is false.
Explanation
In an if-else statement, the if block checks the condition for the true part, whereas the else block executes if the condition is false. The else block in an if-else statement is not mandatory.