Answer Posted / utpal kumar kashyap
Hi to Everyone,
See, inline function is a function whose code get inserted instead of jump to the function where it was called.
We can make any function as inline but there are few conditions in which compiler will not treat it as inline function....
If
1. Function contains any static variable.
2. It recursive.
3. Function code is large.
However, if function body is large and in this case if we try to make it as inline, then compiler wont give an error, but compiler would treat it as normal function. So idea is this, function code should be small for making it inline.
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What are the various compound assignment operators in c++?
How do you find out if a linked-list has an end? (I.e. The list is not a cycle)
Show the declaration for a pointer to function returning long and taking an integer parameter.
What is the difference between #import and #include in c++?
What is a lambda function c++?
Is c++ pass by reference or value?
Will a catch statement catch a derived exception if it is looking for the base class?
What is a pointer how and when is it used?
Can I learn c++ without c?
Write about the role of c++ in the tradeoff of safety vs. Usability?
Why is c++ still best?
Is there a sort function in c++?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Can a program run without main function?
What are virtual constructors/destructors?