web analytics

Structure Of  C Program

Structure Of  C Program


In this post, we will learn about the Structure Of  C Program. Following are the basic Structure Of  C Program

Include header file section

Global declaration section



Declaration statement

Executable statement


User-defined functions




Include Header File Section

C program always depends upon some header files for function definition. Each header file by default is extended with (.h). The header file should begin with #.

Global Declaration

This section declares some variables that are used in more than one function. These variables are known as global variables. Global declaration section must be declared outside of all the functions.

Main Function 

Every program written in C language must contain main () function. The function main() is the entry point of every C program. The execution of the program always begins with the function main ().

Declaration Part

The declaration part always declares the entire variables that are used in the executable part. The initializations of variables are also done in this section

Executable Part

This part contains a set of statements or a single statement. These statements are enclosed between the braces.

User Defined Function

The functions defined by the user are called user-defined functions. These functions are generally defined after the main () function.

Also Read:- What is c?

Also Read:- Interesting facts about C

Related Posts

Leave a Reply

Your email address will not be published.