Saturday, 2 July 2016

Basic Structure of a C Program

Basic Structure of a C Program:

Structure of a C program means the logic to write a program, C is structured Programming language. It provide a better way of writing programs. The linker of C program links many files before execution. There are two parts of a C structure.


  1. Per processor Directives.
  2. Main function.
  • Per-processor Directives:

The instruction given to the compiler before the beginning of the actual program are called per processor directives or compiler directives.

It always begins with # symbol e.g. #include, #define. These are the instructions that tells the compiler to perform an action before compiling the source program.

#include directive:

The include directive gives a program access to the library.

The include directive causes the per processor to insert definitions from a standard
header file into a program before compilation i.e The include directive tells the compiler where
to find the meaning of identifiers used in the programs.

It is used to include header files in the program.

No comments:

Post a Comment