After the line that contains the function name is the function body. The function body has the following features:
It begins with an opening brace {
It ends with a closing brace }
The pair of braces, {}. are used to enclose what is called a block of code. We use braces quite frequently to form blocks of code. Sometimes we use blocks within blocks, In this case, the braces enclose the block of code that is the function body.
The function body consists of C declaration(s) and statement(s). The structure of a typical C main function is as follows:
void main(void)
{
declaration 1;
declaration 2;
statement 1;
statement 2;
}
No comments:
Post a Comment