The statement section follows the declaration section.
This section contains some instructions
that cause something to be performed, such as dividing two numbers.
Let us consider the simplest C program that explains its structure.
/* My first C program */
1. #include
2. int main (void)
3. {
4. printf(“Hello World! \n”);
5. return 0;
6. }
This program has only one preprocessor directive. There are no global declarations and no local
definitions. It simply displays “Hello World!” on the screen. Then there are two statements, one to
print the message and the other to stop the program.
Let us learn about these parts now.
Do'stlaringiz bilan baham: |