Preprocessor Directive and Header Files
Preprocessor Directive and Header Files
Preprocessors are the instructions that are given to the compiler before
beginning the actual program. these are the instructions or directive that tell the
compiler to take action before compiling the source code.
INCLUDE DIRECTIVE:
The include preprocessor directive give a program acces to library. each library
contain different header files.the include preprocessor directive include header
files in the program.
SYNTAX:
#include<standard header file>
EXAMPLE:
#include<stdio.h>
DEFINE DIRECTIVE:
The define directive are used to define a constant. it start with the symbol #.
SYNTAX:
#define Macro_name expression.
EXAMPLE:
#define Pi 3.1428.
HEADER FILE:
Header files are part of C compiler and contain the defination of standard library
functions. there are several header files. Each header file contains defination of
one type of function only. Each header file has an extension (.h)
FOR EXAMPLE:
The "math.h" header file contain the defination of many mathematical functions that are
avaliable in the c language.
#include<stdio.h>
#include<conio.h>