When you use this in the program then in the program this is called macro and #define directive only replaces the macro by before starting of actual compilation.
#define pie 3.14
Void main()
{
float r=3,area;
area=3*r*pie;
printf(“%f”,area);
getch();
}
Before the starting of actual compilation an intermediate is formed which is :
We can see only in place of pie ,3.14 has pasted.
If
e.g :
#define word c is powerful
language.
MACRO FUNCTION:
No comments:
Post a Comment