C++ Programming Code Examples C++ > If Else and Switch Case Code Examples The if-else Ladder/else-if Clause The if-else Ladder/else-if Clause The else-if is the most general way of writing a multi-way decision. if(expression1) statement; else if(expression2) statement; else if(expression3) statement; else if(expression4) { block of statement; } else statement; The expressions are evaluated in order; if an expressionis true, the "statement" or "block of statement" associated with it is executed, and this terminates the whole chain. As always, the code for each statement is either a single statement, or a group of them in braces. The last else part handles the "none of the above" or default case where none of the other conditions is satisfied.