Can inline functions have a recursion? Give the reason?
Answer Posted / sandeep mannarakkal
Inline is a request to the compiler , i.e it may get rejected for the following reasons,
1) If there is recursion (recursion have stack over stack, but inline don't have stack)
2) If static variable is available inside inline function
3) if function definition and implementation are available at different files
4) If there is a function pointer to inline function
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain differences between new() and delete()?
Explain this pointer?
What is difference between rand () and srand ()?
What is cout flush?
Explain the concept of dynamic allocation of memory?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
Explain deep copy?
Why is the function main() special?
What is a container class? What are the types of container classes in c++?
What is the difference between set and map in c++?
What is difference between class and function?
Is c++ platform dependent?
Explain how overloading takes place in c++?
How can we read/write Structures from/to data files?
What is guard code in c++?