Question #274624

What do you mean by Program? Briefly describe the basic structure of C programs.


Expert's answer

A program is a set of definitions of variables, functions and data types.

Basic structure of a C program consist of 6 parts

  1. Documentation section which consist of a set of comment
  2. The link section that provides instruction to the compiler to link the header files or functions from the system library.
  3. The definition section which defines all symbolic constants such by using the #define directive.
  4. Global declaration section: which consist of variables that are used in more than one function.
  5.  Main function section where the main execution of a program takes place
  6. Subprogram section which contains all user-defined functions that are called in the main() function.
LATEST TUTORIALS
APPROVED BY CLIENTS