Valeo Interview Question

What do you know about Macros in C language?

Interview Answers

Anonymous

Feb 21, 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

Anonymous

Jun 26, 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