The if statement is decision making statement. It is used to control the flow of execution of the statements and also used to test logically whether the condition is true or false. It is always used in conjunction with condition. This statement is used when a question requires answer. If the condition is true, then the True statements are executed. If the condition is false then the true statements are not executed, instead the program skip past it. The condition is given by the relational operator like ==, !=, <=, >=, etc.

If statement

//  If statement
int main()
int i=1;
{printf("The number %d is < 10",i);}

Run Example >

< Previous Next >

Privacy Policy Terms of Service About
Creative Commons License
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.