Course Content
Detailed Content of Programming in C
0/1
Introduction
0/1
Structure of C program
0/1
Answers of ‘C’ Pointers Programs
0/1
About Lesson

What is the Basic structure of C Program?

  1. Documentation Section: It increases Program Readability and Includes Comments to tell what the Program actually is.
  2. 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. 
  3. 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.
  4. 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

    }

  5. 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