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
which of the following is not an secondary constant a) array b) real c) union
write a porgram in c++ that reads an integer and print the biggest digit in the number
What are the storage qualifiers?
What is a tuple c++?
How to defines the function in c++?
Give 10 points of differences between C & C++.
what are the iterator and generic algorithms.
What is the need of a destructor?
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
What does override mean in c++?
Will a catch statement catch a derived exception if it is looking for the base class?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
How long it will take to learn c++?