Question Bank (3 marks) · Q26
Q.Write the syntax of nested-if statement.
Karnataka PUCTextbookShort· 3mImportance★★★★★est
80% · 123/154 Questions
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →[!TLDR]
A nested-if places one if inside another, so the inner test is made only if the outer test is true.
In a nested-if, one if statement is contained within the body of another if statement. The inner if is evaluated only when the outer condition is true, allowing more than one condition to be checked in sequence.
if (condition1)
{
if (condition2)
{
statement(s); /* runs only if both conditions are true */
}
}
``` …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.