Write a program that illustrate Macros with Arguments, C/C++ Programming

Assignment Help:

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);
}


Related Discussions:- Write a program that illustrate Macros with Arguments

Minimum shelves, write a program to find the minimum number of shelves

write a program to find the minimum number of shelves

Data structure, how to convert a general tree into binary tree with example...

how to convert a general tree into binary tree with example

Assigment, Hi is there any chance to get assignment for fresher tutor

Hi is there any chance to get assignment for fresher tutor

Software crisis, defining software crisis As the technology changes ra...

defining software crisis As the technology changes rapidly the requirement for the users' change, to part the growing demand of the user for trade,  business, and personal

Objects as function arguments, Objects as Function Arguments: In C prog...

Objects as Function Arguments: In C program there are several methods to define arguments, and in some case even a structure can be approved as an argument.  Similarly in C+

Require flowchart, I require a flowchart for push , & pop operation on stac...

I require a flowchart for push , & pop operation on stack using array

Bitcoin alternative – deployment and modification, I started preparing an a...

I started preparing an alternative cryptocurrency and I am way over my head. I would like help in making modifications to the open source files and then help with deployment. I wil

Net salary, please may i have a brief theory about a c++ program to find ne...

please may i have a brief theory about a c++ program to find net salary of employees

Do i require checking for null before delete p?, No. it's not required T...

No. it's not required The C++ language guarantees that delete p will do nothing if p is equivalent to NULL. As you might get the test backwards, and as most testing methodologie

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd