1.

Pick the incorrect statement about inline functions in C++?(a) They reduce function call overheads(b) These functions are inserted/substituted at the point of call(c) Saves overhead of a return call from a function(d) They are generally very large and complicated functionI have been asked this question in a national level competition.This key question is from Classes in portion Source Files, Classes and Operator Overloading in C++ of C++

Answer»

Correct answer is (d) They are generally very large and complicated function

Easy explanation - Inline are FUNCTIONS that are expanded when it is called. The whole code of the inline function gets inserted/substituted at the point of call. In this, they help in REDUCING the function call overheads. Also they save OVERHEAD of a return call from a function. Inline functions are generally KEPT SMALL.



Discussion

No Comment Found

Related InterviewSolutions