brainly mates give correct answer ✅✅
Attachments:
Answers
Answered by
0
Answer
- When there are many nested if statements but having only one else statement, then it is a case of dangling else statement.
- There could be confusion regarding to which if , the else statement belongs.
if (expr1)
if (expr2)
if (expr3)
else stmnt.
- Normally it belongs to the innermost. But it depends on the language grammar definition. It is better to put { } to clearly indicate the nesting.
Similar questions