Call us at 0700-922-6559 or Click here

if statement in C programming.

if statement is used to specify a block of code to be executed if the condition is true.

Syntax –




Note – if is in lowercase letter. If you use the uppercase letter (If/IF) it will generate an error.

Flowchart –

So let’s understand with an example. In the below example we check the condition 20 is greater than 10.

Example –

Output –

Example explained – So in the above example we know the 20 is greater than 10. So, the condition is true, and we print the screen “20 is greater than 10.”

So if you want to learn more about then join our course.

Leave a Reply

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