C Language



Admission Enquiry Form

  

If statement in C




What is If statement in C?

If statement is conditional statement in C.

Syntax of If statement...

if(condition)
{
//number of statements
}



Example of if statement:


Output

Enter a number 10
Welcome to Compuhelp

In the above example, if the user enters 10 then the control will come inside If statement else it will quit the If statement.