C++ Inline Function Question: Download Questions PDF
Does the inline functions improve performance?
![C++ Inline Function Interview Answer C++ Inline Function Interview Question](https://globalguideline.com/public/images/interview/35.png)
Answer:
A function when defined as INLINE, the code from the function definition is directly copied into the code of the calling function.
★ It avoids the overhead of calling the actual function. This is because the complier performs and inline expansion which eliminates the time overhead when a function is called.
★ Reduces space as no separate set of instructions in memory is written.
★ It avoids the overhead of calling the actual function. This is because the complier performs and inline expansion which eliminates the time overhead when a function is called.
★ Reduces space as no separate set of instructions in memory is written.
Download C++ Inline Function Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain the difference between inline functions and macros? | Described the disadvantages of using macro and inline functions? |