C++ Inline Function Question:
Download Questions PDF

Described the disadvantages of using macro and inline functions?

Answer:

Everyone should decide for themselves to use them, but the use of inline functions over macros is advocated by Bjarne Struoustrup, the creator of C++. The imperative features of inline functions are frequently used with classes in C++. There is similarity between invoking normal functions and inline functions, except that, inline functions are never actually called. The inline functions, as their name suggests, are expanded in line at every time of invocation. All that is needed to invoke an inline function is to prefix the key word 'inline' to the function.

Download C++ Inline Function Interview Questions And Answers PDF

Previous QuestionNext Question
Does the inline functions improve performance?described when recursion functions are declared inline?