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 are the different types of polymorphism in c++?
What happens if a pointer is deleted twice?
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
What are function prototypes?
What is c++ mutable?
What can c++ be used for?
What are the benefits of c++?
Which is the best c++ compiler?
What are formatting flags in ios class?
What is the purpose of ios::basefield in the following statement?
Is c++ the hardest programming language?
How would you call C functions from C++ and vice versa?
How do you invoke a base member function from a derived class in which you have not overridden that function?
Which coding certification is best?
Explain what happens when a pointer is deleted twice?