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 are the difference between a free-standing and a hosted environment?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
What is %d called in c?
Explain what are reserved words?
Why doesn't C support function overloading?
What is the full form of getch?
What is the difference between the local variable and global variable in c?
Why do we use int main instead of void main in c?
What is scope and lifetime of a variable in c?
What is chain pointer in c?
Are enumerations really portable?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
What is anagram in c?
What does the && operator do in a program code?