Programing With C & C++ _removed (1)
Programing With C & C++ _removed (1)
1. Documentation Section
.
➢ He usually gives the name of the program, the details of the author
and other details like the time of coding and description.
Example
/**
* date: 09/08/2019
Anukali Laxman.
^^^^^^^^^^^^^^
2nd Sem Programing with C & C++
* no input needed
*/
2. Link Section
➢ This part of the code is used to declare all the header files that will
be used in the program.
➢ This leads to the compiler being told to link the header files to the
system libraries.
Example
3. Definition Section
This part of the code is the part where the global variables are declared.
All the global variable used are declared in this part. The user-defined
functions are also declared in this part of the code.
Anukali Laxman.
^^^^^^^^^^^^^^
2nd Sem Programing with C & C++
➢ The declaration part is the part where all the variables are declared.
➢ The execution part begins with the curly brackets and ends with the
curly close bracket.
➢ Both the declaration and execution part are inside the curly braces.
Anukali Laxman.
^^^^^^^^^^^^^^
2nd Sem Programing with C & C++
Sample Program
The C program here will find the area of a circle using a user-defined
function and a global variable pi holding the value of pi
Anukali Laxman.
^^^^^^^^^^^^^^
2nd Sem Programing with C & C++
Output
Anukali Laxman.
^^^^^^^^^^^^^^