C++ | Misc C++ | Question 1

Inline functions are useful when
(A) Function is large with many nested loops
(B) Function has many static variables
(C) Function is small and we want to avoid function call overhead.
(D) None of the above


Answer: (C)

Explanation: Inline functions are generally used in place of small macros. They are substitute to macros and better than macros. See following for details.
http://en.wikipedia.org/wiki/Inline_function#Comparison_with_macros

Quiz of this Question

GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details

My Personal Notes arrow_drop_up
Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.