1.

What happens to a function defined inside a class without any complex operations (like looping, a large number of lines, etc)?(a) It becomes a virtual function of the class(b) It becomes a default calling function of the class(c) It becomes an inline function of the class(d) The program gives an errorI got this question in homework.My question is based upon Functions topic in portion Functions, Namespaces & Exceptions in C++ of C++

Answer»

Correct OPTION is (c) It becomes an inline function of the class

The best I can explain: Any function which is defined inside a class and has no complex OPERATIONS LIKE LOOPS, a large number of lines then it is made inline.



Discussion

No Comment Found

Related InterviewSolutions