October 2004
Beginner
408 pages
9h 24m
English
Conditionals are a branching type of control structure, meaning they dictate the course of an application based on certain parameters. Of the branching control structures, the if conditional is the most common. Its syntax is straightforward:
if (condition) { statements; }
The condition is placed within parentheses, followed by—within curly braces—the statement or statements to be executed. If the condition is true, the statements will be executed. If it is false, the statements will not be run.
In C, the simplest representation of false is the number 0 and true is everything else:
if (1) {
printf ("This conditional is always
