What are the advantages of Macro over function?



What are the advantages of Macro over function?..

Answer / hrpynux@gmail.com

When writing macros for functions, they saves a lot of time that is spent by the compiler for invoking / calling the functions. Hence, The advantage of a macro over an actual function, is speed. No time is taken up in passing control to a new function, because control never leaves the home function.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Interview Questions

5) Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.without using big int and exponential function

1 Answers   TCS,


dynamically allocate memory for linear array of n integers,store some elements in it and find some of them

1 Answers  


what is data structure?

5 Answers   CBSE,


differnce between do and do while

3 Answers   DOEACC,


Why does not use getgh(); and <conio.h> in c language.

3 Answers   Elofic,






What is output redirection?

0 Answers  


Explain can you assign a different address to an array tag?

0 Answers  


What is ## preprocessor operator in c?

0 Answers  


Write a program to print the following series 2 5 11 17 23 31 41 47 59 ...

2 Answers  


wat is output of the following int main() { const int j=2; int i; switch(i) { case 1:break; case j:break; default:break; } }

2 Answers  


struct ptr { int a; char b; int *p; }abc; what is d sizeof structure without using "sizeof" operator??

9 Answers   Verifone,


which is conditional construct a) if statement b) switch statement c) while/for d) goto

0 Answers  


Categories