Domanda di colloquio di MediaTek

Difference Between Inline and Macro in C?

Risposta di colloquio

Anonimo

2 set 2018

Macro is an instruction which expands at the time of its invocation. Functions can also be defined, like macros. Similarly, the inline functions also expand at the point of its invocation. One primary difference between inline and macro function is that the inline functions are expanded during compilation, and the macros are expanded when the program is processed by the preprocessor.