What do you mean by inline function?

Answer Posted / subhashish sen

The inline function is a special function which is basically
used for small function body.If a function with large body
is defined as inline then it would be treated as a normal
function.

The advantage is that the code gets inserted at the place of
function call so it will reduce the time taken for control
to go back and forth from function call to function
definition.So as a result it will make execution faster.

Note: When we declare a function as inline we merely send a
request to the compiler,so its up to the compiler whether
our request is is accepted or not.So its better to define an
inline function for a small function.

Is This Answer Correct ?    26 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to sort the number with different sorts in one program ??

1914


What is encapsulation in oops?

534


What is protected in oop?

603


What is encapsulation in oop?

603


Why multiple inheritance is not allowed?

581






How is polymorphism achieved?

583


what is the sylabus for priliminaries?

1686


Is data hiding and abstraction same?

567


What is class encapsulation?

588


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1639


what is the drawback of classical methods in oops?

2918


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

2753


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

1941


Why is polymorphism important in oop?

629


How do you explain polymorphism?

590