---

dotcomma: Control Flow In C – The If Statement

Program flow statements are used to control the order in
which lines of code are executed. The if statement and its
variations allow us to make decisions based on a condition. The
syntax for the if statement is as follows:

if (expression) statement;

“If the expression is true, that is, if it evaluates to a
nonzero value, the statement is executed. Otherwise the expression
is false, evaluates to zero, and the statement is ignored.
Relational expressions are the most common to be evaluated by an if
statement.”

Complete
Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis