In This article we will learn about the Documentation In C Programming Language OR Basic Structure Of C Language With Example After Reading this article you will be able to define about Documentation Section In C, Link Section In C, Definition Section In C, Main Function Section In C And Subprogram Section In C, What is Documentation Section In C.
- Documentation Section
- Link Section
- Definition Section
- Global Declaration Section
- Main() Function Section
- Sub Program Section
- An Example
Quick Links
Basic Structure OF C Language:
Each C Program is consists of 6 main sections, these sections are named as Documentation Section, Link Section, Definition Section, Global Declaration Section, Main Function Section, Subprogram Section. you will find a brief explanation about each section below.
Basic Structure Of C Programming Language |
- Documentation Section: The Documentation Section consists of a set of comment lines giving the name of the Programmer, date, and other details about the program. The documentation section helps anyone to get an overview of the program. Comments may appear anywhere within a program. The text between /* And */ appears as a comment in C.
for Example: /* This is a comment */
- Link Section: The Link section provides instructions to the compiler to link functions from the system library such as using the #include directive.
- Definition Section: All the symbolic constants are written in the definition section. Macros are known as symbolic constant (macro is a process where an identifier is replaced by a predefined string or value in a program) such as using the #define directive.
- Global declaration section: Global Declaration Section contains the global declaration of user-defined functions and Variables. There are some variables that are used in more than one function. Such variables are called Global Variables and are declared in the global declaration section that is outside of all the functions.
- Main() Function Section: It is necessary to have one main() function section in every c program. This section contains two parts, the Declaration Part And Executable Part.
The declaration part declares all the variables that are used in the executable part.
- Subprogram Section: The subprogram section contains all the user-defined functions that are used to perform a specific task. These user-defined functions are called in the main function. User-defined functions are generally placed just after the main() function, although they may appear in any order.
Example Of Basic Structure Of C Language:
Example Of Basic Structure Of C Language |
Conclusion:
in this article, we learned about the Basic Structure Of C Language With an Example. Any C Program is consists of 6 main sections that are
- Documentation Section
- Link Section
- Definition Section
- Global Declaration Section
- Main() Function Section
- Sub-Program Section
If you find that this article is useful for you then please share this article with your friends on Facebook, Twitter or WhatsApp.
Thank You !!
Tags: C Language Basics, C Language for Begginers, Basic Structure OF C Language with an example, Documentation Section OF C Language, Link Section OF C Language, Defenation Section OF C Language,, Global Declaration Section OF C Language,, Main Function Section OF C Language, Subprogram Section OF C Language, Documentation in C Language, SubProgram Section In C, Structure Of C Program, Structure OF C Programming, Documentation In C Language