Utility Functions and C Language Reference > C Language Reference > Alphabetical List of Functions > if

if

Example: if

An control flow logic function used to execute an instruction or a block of instructions only if a condition is fulfilled. If the condition in the parentheses following the if is true, the instructions are executed.

if( expression ) statement1;

or

if( expression ) statement1;
elsestatement2 ;