If-else:
The statement is used to test a condition and take one of the two possible actions. If the condition is true then a single statement or a block of statements is executed (one part of the program), otherwise another single statement or a block of statements is executed (other part of the program). Recall that in C, any nonzero value is regarded as true while zero is regarded as false.
Syntax 1:
if (condition) { statement; ......... }
There can be a single statement or a block of statements after the if part.

Flow chart of if control statement
Here if the condition is true (nonzero) then statement 1 is executed, and if it is false(zero), then the next statement which is immediately after the if control statement is executed.
Syntax 2:
if(condition) { statement; ......... } else { statement; ......... }

Flow chart of if-else control statement
Here if the condition is true then statement is executed and if it is false then statement2 is executed. After this the control transfers to the next statement which is immediately after the if-else control statement.