write a program that illustrate macros with


Write a program that illustrate  Macros with Arguments?

Macros is able to also have arguments, just as functions can.

#define AREA(x)(3.14*x*x)

Then at any time the preprocessor finds the phrase AREA (x) it expands it into the statement 3.14 * x * x be careful not to leave a blank space between the macro template and its arguments while defining the macro. The whole macro expansion should also be enclosed within parentheses.

# define AREA(x)(3.14*x*x)
# include

main()
{
float x=2.5,result;
result=AREA(x);
printf("%f",result);
}

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: write a program that illustrate macros with
Reference No:- TGS0305241

Expected delivery within 24 Hours