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

What is the difference between macros and inline functions?

Answer Posted / vishal

1> Macros are always expanded by pre-processor, whereas compiler may or may not replace the inline definitions. You cant force compiler to make a function inline. It is purely compiler based decision.

2> Debugging macros is also difficult.

3>  Expressions passed as arguments to inline functions are evaluated once. In some cases, expressions passed as arguments to macros can be evaluated more than once.

Here i got exact answer : http://www.firmcodes.com/difference-macro-inline-c/

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does c have an equivalent to pascals with statement?

1006


What is the use of getchar functions?

1185


Can we initialize extern variable in c?

1138


How can I find out the size of a file, prior to reading it in?

1179


Why c language is called c?

1017


Apart from dennis ritchie who the other person who contributed in design of c language.

1400


Explain what is the most efficient way to store flag values?

1232


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1079


What is a function simple definition?

1097


What does the c in ctime mean?

1096


What does emoji p mean?

1120


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

1305


Why we use void main in c?

1173


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

1091


What is meant by operator precedence?

1150