Every If statement requires a condition, and the code written in the if block is executed only of the comparison returns true, i.e 1.

This program is an simple example to show how "If statement" works. To illustrate the point i have written a complete code for only one of the five examples discussed above. Below this code are code block you can replace to implement other examples.