Answer Posted / soruabh
When you call a function your compiler enters a
call-sequence (which takes
time) and allocates a new stack frame for that function
(whcih takes text
stack space) so that the function's body can be executed.
After it's done
you enter a returning-sequence phase (which takes time).
A macro does not need anything of the above, because it's
preprocessor's job
to expand a macro, it's only about text replacement, not
about compiler
stuff or code-generating issues. So you don't expend time
and space doing
what a function would need in order to be executed.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is algorithm in c++ programming?
Why is c++ awesome?
What is the difference between global int and static int declaration?
Do you know what are pure virtual functions?
Explain the purpose of the keyword volatile.
What is the use of pointer in c++ with example?
What is the main purpose of c++?
Is java the same as c++?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
How are pointers type-cast?
Why do we need templates?
Is c++ an integer?
What does I ++ mean in c++?
Explain what are single and multiple inheritances in c++?
Explain Memory Allocation in C/C++ ?