- Macro on a highLevel copy paste,it’s definitions to places wherever it is called.due to which it saves a lot of time,as no time is spent while passing the control to a new function and the control iss always with the callee function.however, one downside is the size of the complied binary is large but once complied the program comparatively runs faster.
Vishalini.R Answered question June 23, 2023
The biggest advantage of using macros is that they execute faster. Each time a macro is used, it is expanded (replaced with its definition) inline during preprocessing. A function definition happens only once, no matter how many times it is called. A function-like macro definition is more sophisticated than an object-like macro declaration in that it states the names of formal parameters within brackets, separated by commas. It is legal to have an empty formal parameter list: such a macro can be used to imitate a function that takes no arguments.
Vishalini.R Answered question June 23, 2023
