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
Which one between if-else and switch is more efficient?
What is conditions when using boolean operators?
What is meaning of in c++?
Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].
Write about the role of c++ in the tradeoff of safety vs. Usability?
How does a C++ structure differ from a C++ class?
What is a type library?
What are the advantages of using a pointer?
What is the difference between method overloading and method overriding in c++?
What is namespace & why it is used in c++?
What are mutator methods in c++?
What type of question are asked in GE code writing test based on c++ data structures and pointers?
In what situations do you have to use initialization list rather than assignment in constructors?
What is meant by forward referencing and when should it be used?
How do you invoke a base member function from a derived class in which you have not overridden that function?