C++ Inline Function Question:
Download Questions PDF

Described the advantages of using macro and inline functions?

Answer:

A textual substitution is provided by a macro as a constant, where as an inline function is procedure which is called at each time. Although the macros have few advantages over inline functions, the disadvantages are numerous. For example, a macro can not perform type checking and validation, as these operations are performed in a function at the most.

Download C++ Inline Function Interview Questions And Answers PDF

Previous QuestionNext Question
Explain static member functions?Explain the difference between inline functions and macros?