Home C PROGRAM Basic Structure of C Program

Basic Structure of C Program

structure of c program

Basic Structure of C Program

Structure means something that is constructed or something arranged in a definite pattern of organization. Almost everything has a definite structure. In the same way, the computer programming languages is having a systematic definite Structure. These structures have to be followed while assigning a code to something for classification or identification.
  • A well-structured C program makes debugging easier
  • It increases the readability and modularity of the code
  • It is defined by its control flow
  • Structures are built up of blocks of codes
  • Blocks have a single entry and exit in the control flow

The Basic Structure of a C Program is comprehensively divided into seven parts for different purposes. It makes the program easy to read and easy to modify. These parts are-

Documentation Section: It covers the statement stated at the beginning of a program, such as a program’s name, date, description and title.

Definition Section: The Definition Section comprises of various constants declared using the define keyword.

Main Function Section: Main() is the first function to be executed by the computer. It is necessary for a code to include the main(). It is like any other function available in the C library.

Link Section: The Link Section supplies instructions to the compiler to link functions from the system library.

Global Declaration Section: The Global Section comprises of all the global declarations in the program.

User-defined Function Section: The User-defined functions specified the functions specified as per the requirements of the user.

Declaration Section: It names a type and specifies a sequence of variable values (called “members” or “fields” of the structure) that can have different types.

Basic Structure in C Program

also read:

Previous articleC Programming Lab Course
Next articleNational Digital Library of India (NDLI)


Please enter your comment!
Please enter your name here