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
Can I create my own functions in c++?
What is vector pair in c++?
How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?
Describe new operator?
How is computer programming useful in real life?
Which one is better- macro or function?
Explain what are the sizes and ranges of the basic c++ data types?
How can you differentiate between inheritance and implementation in c++?
the maximum length of a character constant can be a) 2 b) 1 c) 8
Is swift faster than go?
Why do we need templates?
Which bit wise operator is suitable for checking whether a particular bit is on or off?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
Describe friend function & its advantages.
What are advantages of c++?