C - if Blocks Statements

Introduction

You can use a block of statements enclosed between braces {} within if statement.

You can use several statements that are to be executed when the value of an if expression is true.

The general form for an if statement that involves statement blocks would look like this:

if(expression)
{
  StatementA1;
  StatementA2;
  . . .
}
else
{
  StatementB1;
  StatementB2;
  . . .
}

Next_statement;

Related Topic