CBSE Class 11 Informatics Practices
Question 3 of 75
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 else checks for the false part.
Reasoning (R): In a conditional construct, 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 if a condition is true and will execute a block of statements and if the condition is false, it won't execute that block. The else part executes a block of code when the if condition is false. In a conditional construct, the else block is not mandatory.