In C++, it is possible to define functions that are not actually called but, rather are expanded inline, at the point of each call. The advantage of inline functions is that they have no overhead associated with the function call and return mechanism. That means inline functions can be executed much faster than normal functions.
Example:
inline void sum()
{
int i,sum=0;
for(i=0;i<10;i++)
sum=sum+i;
cout<<sum;
}Offline