top of page

Frequently Asked C Language Interview Question & Answers

Advantages of a macro over a function?

Actually, macro and function are used for different purposes. A macro replaces its expression code physically in the code at the time of preprocessing. But in case of a function, the control goes to the function while executing the code. So when the code is small then it is better to use a macro. But when code is large then the function should be used.

Close
bottom of page