In if-else statement first of all ‘If’ condition is checked and if the condition is true then ‘If’ statement gets executed otherwise ‘else’ statements gets executed. An if statement can be followed by an optional else statement, which executes when the Boolean expression is false.
C Program executes sequentially i.e. line after line but we can change this pattern by entering some condition in it. So, if we put some condition then the flow of execution changes i.e. conditions are checked and then executed accordingly. If the condition found true the statements in conditional area will be executed otherwise it will leave the conditional area and will execute the code next to if skeleton.