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
Write a recursive program to calculate factorial in c++.
which of the following is not an secondary constant a) array b) real c) union
What is split a string in c++?
What is the output of the following program? Why?
If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?
How many ways can a variable be initialized into in C++?
Describe private, protected and public?
What is the protected keyword used for?
Describe friend function & its advantages.
Explain the differences between list x; & list x();.
Which is the best c++ software?
What are c++ storage classes?
What is the use of c++ programming language in real life?
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..
What are compilers in c++?