Will the inline function be compiled as the inline function always? Justify.

When we are putting inline keyword for any function or if we are defining function inside the class declaration itself, we are just requesting compiler to treat it as an inline function i. e. instead of making a function call just replace that function call with actual function body.
Compiler usually decide whether to treat a requested function as an inline or not based on the size of function. if a funtion is having huge body, with lot of looping and complicated code compiler may just ignore inline request.

No comments: