When a member function is defined inside a class, we do not require to place membership label along with the function name. We use only small functions inside the class definition and such functions are known as inline functions. In case of inline function, program execution is faster but memory penalty is there.
Inline function C++ program: