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 using namespace std in cpp?
What's the best free c++ profiler for windows?
What is function overloading in C++?
Explain data encapsulation?
How can you link a c program with a c function?
Can we run c program in turbo c++?
Explain Memory Allocation in C/C++ ?
Explain the difference between overloading and overriding?
What are keywords in c++?
Using a smart pointer can we iterate through a container?
Can a class be static in c++?
What is anonymous object in c++?
What do you mean by early binding?
Which is best ide for c++?
What is bubble sort c++?