Skip to main content
ICT
Lesson A8 - Control Structures
 
Main   Previous Next
 

H. Compound Statements page 10 of 17

  1. The statement executed in a control structure can be a block of statements, grouped together into a single compound statement.

  1. A compound statement is created by enclosing any number of single statements by braces as shown in the following example:

    if (expression)
    {
       statement1;
       statement2;
       statement3;
    }
    else
    {
       statement4;
       statement5;
       statement6;
    }

Main   Previous Next
Contact
 © ICT 2006, All Rights Reserved.