What are Inline Functions?

Inline functions are used to increase the speed of a program at run time i.e. its execution speed. A function is declared inline by using the inline keyword along with the function. When we declare a function as an Inline function then the compiler replaces the function call with its definition and in this way the process of transferring control from function call to function definition and returning control back to main function() is not done and in this way the overhead of the compiler is removed.
Eg of inline function:
Inline int add (int x, int y) //inline function
{
return x+y;
}

More Questions

Leave a Reply

Word Verfication * Time limit is exhausted. Please reload CAPTCHA.