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

difference between macro and function?

Answer Posted / utpal kumar kashyap

Hi to Everyone,
See, inline function is a function whose code get inserted instead of jump to the function where it was called.
We can make any function as inline but there are few conditions in which compiler will not treat it as inline function....
If
1. Function contains any static variable.
2. It recursive.
3. Function code is large.

However, if function body is large and in this case if we try to make it as inline, then compiler wont give an error, but compiler would treat it as normal function. So idea is this, function code should be small for making it inline.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I create my own functions in c++?

1080


What is vector pair in c++?

1221


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

2310


Describe new operator?

1156


How is computer programming useful in real life?

1055


Which one is better- macro or function?

1188


Explain what are the sizes and ranges of the basic c++ data types?

1156


How can you differentiate between inheritance and implementation in c++?

1209


the maximum length of a character constant can be a) 2 b) 1 c) 8

1092


Is swift faster than go?

1092


Why do we need templates?

988


Which bit wise operator is suitable for checking whether a particular bit is on or off?

1022


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

991


Describe friend function & its advantages.

1133


What are advantages of c++?

1020