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


Please Help Members By Posting Answers For Below Questions

Which one between if-else and switch is more efficient?

686


What is conditions when using boolean operators?

694


What is meaning of in c++?

762


Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].

688


Write about the role of c++ in the tradeoff of safety vs. Usability?

680






How does a C++ structure differ from a C++ class?

710


What is a type library?

780


What are the advantages of using a pointer?

693


What is the difference between method overloading and method overriding in c++?

647


What is namespace & why it is used in c++?

691


What are mutator methods in c++?

747


What type of question are asked in GE code writing test based on c++ data structures and pointers?

3595


In what situations do you have to use initialization list rather than assignment in constructors?

719


What is meant by forward referencing and when should it be used?

653


How do you invoke a base member function from a derived class in which you have not overridden that function?

697