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 dynamic type checking?
Explain operator overloading.
What are the types of container classes?
Who made c++?
What is the role of static keyword for a class member variable?
Define private, protected and public access control.
Differentiate between a template class and class template in c++?
A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.
Explain the scope of resolution operator.
What are the types of pointer?
What is oops in c++?
Is c++ free?
Is facebook written in c++?
Does improper inheritance have a potential to wreck a project?
What is oop in c++?