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 a char in c?
What is declaration and definition in c?
Can we declare variable anywhere in c?
What does != Mean in c?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
Can the “if” function be used in comparing strings?
The statement, int(*x[]) () what does in indicate?
Explain logical errors? Compare with syntax errors.
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
where are auto variables stored? What are the characteristics of an auto variable?
Write a program to check prime number in c programming?
In a header file whether functions are declared or defined?
What are the complete rules for header file searching?
What is the difference between memcpy and memmove?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58