data structures using #include int main(int = if ( > ++printf("\ % " )return in the above codewe take variable and initialize it to in the test expressionwe check if the value of is greater than as the test expression evaluates to trueand the value of is incremented after thatthe value of is printed on the screen the output of this program is observe that the printf statement will be executed even if the test expression is false note in case the statement block contains only one statementputting curly brackets becomes optional if there are more than one statement in the statement blockputting curly brackets becomes mandatory if-else statement we have studied that using if statement plays vital role in conditional branching its usage is very simple the test expression is evaluatedif the result is truethe statement(sfollowed by the expression is executedelse if the expression is falsethe statement is skipped by the compiler what if you want separate set of statements to be executed if the expression returns false valuein such caseswe can use an if-else statement rather than using simple if statement the general form of simple if-else statement is shown in fig syntax of if-else statement if (test expressionstatement block else statement block statement xtrue test expression statement block false statement block statement figure if-else statement construct in the if-else constructfirst the test expression is evaluated if the expression is truestatement block is executed and statement block is skipped otherwiseif the expression is falsestatement block is executed and statement block is ignored in any case after the statement block or gets executedthe control will pass to statement thereforestatement is executed in every case