Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can inline functions have a recursion? Give the reason?

Answers were Sorted based on User's Feedback



Can inline functions have a recursion? Give the reason?..

Answer / guest

Calling the by itself, then the function is no longer
called as Inline. Compiler never know how depth of the
recursion at compilation time. Therefore inline functions
cant have a recursion

Is This Answer Correct ?    14 Yes 2 No

Can inline functions have a recursion? Give the reason?..

Answer / 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

Can inline functions have a recursion? Give the reason?..

Answer / siva

I have tested The answer is....

Yes, you can use but Not preferable.
Inline functions are expanded as macros at compile time.
Generally inline is used if the function has fewer lines of
code.

Is This Answer Correct ?    6 Yes 9 No

Post New Answer

More C++ General Interview Questions

Explain the use of vtable.

0 Answers  


What is an accessor in c++?

0 Answers  


What are the vectors in c++?

0 Answers  


What's the most powerful programming language?

0 Answers  


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

0 Answers   Yahoo,


How many standards of c++ are there?

0 Answers  


Difference between Abstraction and encapsulation in C++?

0 Answers   Impetus,


Does c++ cost money?

0 Answers  


Why is the function main() special?

0 Answers  


Is c better than c++?

0 Answers  


Write a C++ program to sort digits of all the 4 digit number and display the sorted 4 digit number

1 Answers   TATA, TCS,


List the merits and demerits of declaring a nested class in C++?

0 Answers  


Categories