adplus-dvertising
CPP MCQ
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 an inline function of the class
C)
It becomes a default calling function of the class
D)
The program gives an error

Correct Answer : Option (B) :   It becomes an inline function of the class

Explanation : 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.