Q:

What do you mean by inline function and How to implement the inline function in C++?

0

What do you mean by inline function and How to implement the inline function in C++?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

The inline keyword tells the compiler to substitute the code within the function definition for every instance of a function call. However, substitution occurs only at the compiler’s discretion. For example, the compiler does not inline a function if its address is taken or if it is too large to inline.

Syntax of inline function,

inline return-type function-name(parameters)
{
    // function code
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Interview Questions and Answers(2022)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is the use of the inline function in C++?... >>
<< What are static members in C++?...