Pregunta de entrevista de Valeo

What do you know about Macros in C language?

Respuestas de entrevistas

Anónimo

21 de feb de 2012

Macros are pre-processor search and replace, it can be used for definitions (#define Max 300), or to replace function calls by the function body itself (#define Add(a,b) (a+b)). It save overhead caused by function calls, but it uses more memory space.

2

Anónimo

26 de jun de 2016

Macros are pre-processor text replacing process. It is supported by all compilers opposite to the inline function. Type check is not supported in macros.

3