If-else statement in C

If-else: statements are used to control the flow of Program based on some conditions, only the difference is it is used to execute some statement code blocks. if the expression is evaluated to true, otherwise it executes else block. Which is shown in below flow chart.





  Syntax:

if(condition)
{
       //block of statements;
}
else
{
      //block of statements;
}


Above syntax shows the working of if-else statement.


To explore if-else statements examples and their solutions Click Here.

No comments:

Post a Comment

If you have any doubts, please discuss here...👇