1.

Which among the following best describes the inline member functions?(a) Functions defined inside the class only(b) Functions with keyword inline only(c) Functions defined outside the class(d) Functions defined inside the class or with the keyword inlineThe question was asked during an internship interview.The query is from Types of Member Functions topic in chapter Member Functions & its Types of Object Oriented Programming

Answer»

Correct option is (d) Functions defined inside the CLASS or with the KEYWORD inline

Easiest explanation - The functions which are defined with the keyword inline or are defined inside the class are treated to be inline functions. Definitions inside the class are implicitly made inline if none of the COMPLEX statements are used in the definition.



Discussion

No Comment Found

Related InterviewSolutions