C++ If

C++ Control Statement

C++ control statement or decision making statement is used to control the flow of program statement according to condition applied.

C++ if Control Statement

An if control statement in C++ is used to control the flow of program statement on the behalf of condition applied.

When if condition returns true boolean value then statement within if block will be executed. And when if condition returns false boolean value then statement after the if condition will be executed.

Syntax

C++ if Example

Output