Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

if Statement

if statement has the following syntax:

if (expr)
    statement-block | { statement-block * }
    statement-block | { statement-block * }

    statement | field-declaration

expr is evaluated at run-time and if true, the first statement-block is evaluated, otherwise, the second statement-block is evaluated. If it is omitted and expr is false, nothing is evaluated and control flows to the next statement or declaration. If multiple statements or declarations need to be specified in the body of if or else, use the curly braces. For example:

struct A
    int a;
    if (a>0)
        float b;
        double b;
        int c;