Structure of c
The structure of c program is nothing but the way of framing the group of statement while writing a c program. Step to learn c language. we have arrived to a conclusion that a program us a collection of statement.
1. Documentation Section-
This section is used to declaration of the program name or comments.
2. Pre-processor Directives-
This section is used to start with # symbol. These statement instruct the compiler to
include the specified file in the begenning of the program.
E.G- "#include
3. Global Declaration-
The variable that are declaration all the function are called Global variable. All the function can access these variable by default the global variable initialised with zero.
4. Main() -
Each and every c programs should have a function main() and this function is always executed first. The statement is closed with in left and right curly braces "{ }" are called body of function.
5. Declaration Section-
The local variable that are to be used in the main() should declaration in this section.
6. Executable Section-
This section contain the builting block of the program. The block containing executable statement represent the direction given to the processor to perform the task.
7. User Defined Function-
This is last optical selection of the program structure. The function write by the user to perform particular task are called user Defined function.
program
Write a program to print the messag
#include <stdio.h>
void main() {
printf("This is C programming Tutorial"); getch(); }
No comments:
Post a Comment