Structure Of  C Program

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

main()

{

Declaration statement

Executable statement

}

User-defined functions

{

Statements

}

 

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

basicittopic

basicittopic

A Computer Science Study for IT students and people of IT community

8 thoughts on “Structure Of  C Program

  • August 5, 2018 at 5:52 am
    Permalink

    It is the best time to make some plans for the future and it’s time to be happy. I have read this post and if I could I desire to suggest you some interesting things or suggestions. Maybe you could write next articles referring to this article. I desire to read even more things about it!

    Reply
  • August 29, 2018 at 9:06 pm
    Permalink

    I would like to express my love for your kind-heartedness giving support to men who absolutely need help with the subject. Your very own dedication to passing the solution all over turned out to be extremely informative and have truly empowered others just like me to arrive at their pursuits. Your own helpful guidelines implies a whole lot a person like me and further more to my office colleagues. Thanks a lot; from everyone of us.

    Reply
  • February 27, 2019 at 1:47 pm
    Permalink

    This website truly has alll of the information and facts I wanted about this subject and didn’t know who to ask.

    Reply

Leave a Reply