Structure of C Program - Devbhoomi

FREE JOB ALERT & ONLINE TUTORIALS

Hot

Post Top Ad

Sunday 5 November 2017

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()
            {
            ....
            }
        

No comments:

Post a Comment

Post Top Ad