Q:

: What is a “dangling else”? How are else clauses resolved in C++

0

: What is a “dangling else”? How are else clauses resolved in C++?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

A "dangling `else`" means the ambiguity that an `else` may belong to several `if`. In C++, this is resolved by specifying that each `else` is matched with the closest preceding unmatched `if`.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now