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
Describe Trees using C++ with an example.
What are put and get pointers?
What is the benefit of encapsulation?
Define the process of error-handling in case of constructor failure?
Can a constructor return a value?
What are iterators in c++?
Why do we learn c++?
What is a singleton c++?
What do you mean by delegate? Can a user retain delegates?
Why do we need function?
What is the difference between #define debug 0 and #undef debug?
What is the best c++ book?
Explain object slicing in c++?
what is a reference variable in C++?
Show the declaration for a static function pointer.