What is the difference between macros and inline functions?

Answer Posted / rahul sharma

Macro is a must do thing whearas inline is a hint to the compiler. he may choose not to inline if the function seems complex (it uses recursion or many loops)

Macro can have side effects e.g. the typical
SQUARE(++i); problem

but these problem are not there in inline functions

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I make it pause before closing the program output window?

580


Can a local variable be volatile in c?

575


What is action and transformation in spark?

594


What are 'near' and 'far' pointers?

620


Why c is called object oriented language?

582






What does %d do?

719


Is register a keyword in c?

633


What does %c mean in c?

647


Explain argument and its types.

602


please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

1327


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

644


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

597


What is a structure member in c?

547


Why doesnt this code work?

618


Tell me is null always defined as 0(zero)?

672