Documentation
Section: - This is an important section. Because you write a C program and
mention this section then any one open or view our program and you mention this
section then viewer’s are read this section and understand what type of
operation are perform in our program or what is the purpose so you write a
program.
So Documentation section is helpful
for viewer’s are used this section and easily understand our program.
Note:-
1. Documentation section is separate with
comment.
2. Compiler ignore documentation section because
it is separated with comment.
Link Section: - This section contains Header File. Header file contain lots of
predefine and precompiled function and those function are used to our program.
Header file are exists inside system in a specific location. In duration of
program creation some predefine function (printf and scanf) are used. At the time
of compilation compiler find the predefine function definition section because
those definition are exist inside header file. So link section are establish
link between exists predefine function in our program to exist predefine
function definition in specific header file. So compiler get definition section
in header file after linking and add in our program then your program is
successfully run. This is a mandatory section of C Programming.
main() Section:
-
main() is an identifier or name of the function. It is system define function.
It is entry point of our program. To mention declaration or executable section
behind main() function. Compiler start compilation in main() function.
One main() function are exist in our program.
How to use main()
function
1. To declare a main() function
a. main()
function declaration is divided into three part.
i. Return
type of the function.
ii. Name
of the function.
iii. How
many argument exist in the function.
main() function
declaration example
main()
main(void)
int main()
int
main(void)
void
main()
void
main(void)
2. Function body start with Opening Curly Braces
({).
3. main() function body is divided into two section.
a. Declaration
Section
b. Executable section
4. Function body is close with
closing braces (}).
/*
Write a program to print your name
Developer Name: - Raushan Kumar
Date: - 27/09/2015
*/
#include <stdio.h>
int
main()
{
printf("My Name is c programmer");
return 0;
}Click Here to Download Above Notes
0 comments:
Post a Comment