0% found this document useful (0 votes)
15 views2 pages

Preprocessor Directive and Header Files

Preprocessor directives are instructions given to the compiler before program compilation, starting with a '#' symbol, such as 'include' and 'define'. The 'include' directive allows access to library header files, while the 'define' directive is used to define constants. Header files, which have a '.h' extension, contain definitions of standard library functions and are included in a program as needed.

Uploaded by

aslamsaira437
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Preprocessor Directive and Header Files

Preprocessor directives are instructions given to the compiler before program compilation, starting with a '#' symbol, such as 'include' and 'define'. The 'include' directive allows access to library header files, while the 'define' directive is used to define constants. Header files, which have a '.h' extension, contain definitions of standard library functions and are included in a program as needed.

Uploaded by

aslamsaira437
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

PREPROCESSOR DIRECTIVES:

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.

the preprrocessor directive start with a nunber sign ( #) keywords "include" or


"define".

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 #.

It is not terminatedwith semicolon. It can be used anywhere in the program.

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>

A header file is added if any of its function is used in the program.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy