Can inline functions be used to improve performance?

Options
- No
- yes, depends on the situation


CORRECT ANSWER : yes, depends on the situation

Discussion Board
C++ - Inline Function

Yes, inline functions can be used to improve performance, but it depends on the situation. Inline functions do increase efficiency, but we should not make all the functions inline. Because if we make large functions inline, it may lead to code bloat, and might affect the speed too. Hence, it is advised to define large functions outside the class definition using scope resolution :: operator, because if we define such functions inside class definition, then they become inline automatically.

Prajakta Pandit 01-25-2017 12:22 AM

c++

good questions from c++

Anup kumar 03-30-2016 04:44 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement