0
926views
written 5.9 years ago by |
(a) Header file
$\hspace{2.5cm}$- files that comes with compiler
For example:
$\underbrace{\#include}_{\text{preprocessor directive to call header file}}$ $\underbrace{\lt stdio.h\gt}_{\text{header file}}$
(b) Macros
Advantages of using macro:
For eg:
#include$\lt stdio.h\gt$
#define MAX-SIZE 10 // Macro
int main(void)
{ int size = 0;
size = size + MAX-SIZE;
printf("%d", size);
return 0;
}
After preprocessing,
#include$\lt stdio.h\gt$
#...
..
int main(void)
{ int size = 0;
size = size + 10;
...
...
}
The macro MAX-SIZE is replaced by its value(10).