An inline function is a function that is expanded in line when it is invoked.That is, the compiler replaces the function call with the corresponding function code. The inline functions are defined as follows:
                                   
Inline function-header
                                    {
                                                function body
                                    }

Example:
           
Inline double cube (double a)
            {
                        return (a*a*a);
            }

            The above inline function can be invoked by statements like
                                   
C=cube (3.0);
                                    D=cube (2.5+1.5);

            Some of the situations where inline expansion may not work are:
                       

    • For functions returning values,if a loop,a switch,or a goto exists.
    • For functions not returning values,if a return statement exits.
    • If functions contain static variables.
    • If inline functions are recursive.