C++ Inline Function Question:
Download Job Interview Questions and Answers PDF
Tell me what happens when recursion functions are declared inline?
Answer:
The call to the body of the function is replaced by an inline function. This reduces the saving context on stack overhead. This process is efficient when the size of the function is small and invoked occasionally. Deep nesting of a method is done when a function is invoked recursively. The inline function is invoked recursively, and every call to itself is replaced with the body of the function, thus consumes a lot of code space.
Download C++ Inline Function Interview Questions And Answers
PDF
Previous Question | Next Question |
Please explain, do inline functions improve performance? | Can you please explain the difference between inline functions and macros? |