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
Describe linked list using C++ with an example.
How one would use switch in a program?
Is c the same as c++?
Will a catch statement catch a derived exception if it is looking for the base class?
Is c++ double?
What is class syntax c++?
Difference between a homogeneous and a heterogeneous container
Is empty stack c++?
What do you mean by inheritance in c++? Explain its types.
What is virtual base class?
What is a c++ class?
What is c++ stringstream?
What are the two main components of c++?
what is pre-processor in C++?
which operator is used for performing an exponential operation a) > b) ^ c) none