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...

5. Can inline functions have a recursion?

Answer Posted / jeremiah

A function that is marked "inline" can also be recursive.
- The "inline" keyword on a function definition is only a
suggestion to the compiler that this function is a good
candidate for inlining. The compiler will still have the
final say if the function can be inlined or not.
- In certain cases a function cannot be inlined even if it
has the "inline" modifier:
* You use the function as a callback which requires a
pointer to the function.
* You make a recursive call to the function that has been
marked inline. In this case, the compiler can't determine
the base case for the recursive function and theirfor can't
unroll the inline function in the recursive call. Then an
external version of the function is required.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between late binding and early binding. What are the advantages of early binding?

1078


What is the type of 'this' pointer? When does it get created?

997


What is the main purpose of overloading operators?

1206


What is null pointer and void pointer and what is their use?

1149


Define friend function.

1109


Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)

2001


What is constructor c++?

1156


Which bit wise operator is suitable for putting on a particular bit in a number?

1259


What is token c++?

1087


what is VOID?

1123


What is a storage class?

1370


What is polymorphism and its type in c++?

1118


Which software is used to run c++ program?

1043


Is c++ double?

1097


How would perform Pattern Matching in C++?

1313