About Lesson
What is the Basic structure of C Program?
- Documentation Section: It increases Program Readability and Includes Comments to tell what the Program actually is.
- Link Section: It Includes the Linkage details of program with ‘C‘ Standard Library Functions and Definition. It basically includes macros such as #include, #define, etc.
- Global Declaration Section: It Includes Global Variables which are used throughout the Program and its Subprograms /Subsections for keeping data values. It also Includes Function Declaration Statements.
- Main Program Section: It Includes the Main Section which Starts from the Keyword Main and end with the symbol ‘}‘.
Example:
main()
{
Local declarative part
executable statements
}
- Subroutine Section: This Section contains the details and Definitions of Subroutines/Functions Declared in the Global Declaration Section. There can be one or many functions in one program, but the main function is only one in one program.
Function 1
Function 2
.
.
.
Function n