Macro calls are replaced with macro expansions (meaning).
| In function call, the control is passed to a
function definition along with arguments, and definition is processed
and value may be returned to call
|
Macros run programs faster but increase the program size.
| Functions make program size smaller and compact.
|
If macro is called 100 numbers of times, the size of the program will increase.
| If function is called 100 numbers of times, the program size will not increase.
|
It is better to use Macros, when the definition is very small in size.
| It is better to use functions, when the definition is bigger in size. |
No comments:
Post a Comment