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
What is the purpose of 'register' keyword in c language?
Write a code of a general series where the next element is the sum of last k terms.
Explain the array representation of a binary tree in C.
Difference between goto, long jmp() and setjmp()?
Difference between malloc() and calloc() function?
Explain what is a const pointer?
explain what is an endless loop?
Explain the use of bit fieild.
Explain the advantages and disadvantages of macros.
Differentiate between null and void pointers.
Should a function contain a return statement if it does not return a value?
What is the use of static variable in c?
What is the difference between call by value and call by reference in c?
Explain what is the concatenation operator?
What is a char in c?