AsegGasiaBlog

C Programming - Introduction - Structure of C Program

 Structure of C Program

  • C is a case sensitive language.
  • C Program consist of one or more functions.
  • One function that must be present in every C program is main(). This is the 1st function called up when program execution begins.

C program basically consists of the following parts:

  • Preprocessor Commands
  • Functions
  • Variables
  • Statements & Expressions
  • Comments

Structure of C Program is illustrated below :


//Preprocessor directives

//Global data declarations

main() // main function
{
    //Declaration part;

    //Program statements;

}

//User defined functions
func1()
{
    ....
}

func2()
{
    ....
}

.
.
.

funcn()
{
    ....
}
    

Popular Posts