Variables and Keywords

if and else

In C programming, if and else are used to make decisions.

if (i == 1)
   printf("i is 1.")
   printf("i is not 1.")

If the value of i is other than 1, the output will be :

i is not 1

Leave a Reply

Your email address will not be published. Required fields are marked *