An if
statement contains a Boolean
expression, in parentheses, followed by an embedded statement:
if (Boolean expression) embedded statement
When the Boolean expression of an if
statement evaluates to
any integer other than 0
, C considers the expression to
be true and executes the embedded statement; otherwise, if the Boolean
expression evaluates to 0
, C considers the expression to be
false and skips the embedded statement.