Explain If-else statement

If-else statement: It is a control structure employed to select between performing one of two alternative events.

    if(boolean-expression){
        // Statements performed whenever expression is true.
        ...
    }
    else{
        // Statements performed whenever expression is false.
        ...
    }

This is controlled by a Boolean expression.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.