What do you mean by inline function?

Answers were Sorted based on User's Feedback



What do you mean by inline function?..

Answer / 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

What do you mean by inline function?..

Answer / prakash bora

The idea behind inline functions is to insert the code of a
called function at the point where the function is called.
If done carefully, this can improve the application's
performance in exchange for increased compile time and
possibly (but not always) an increase in the size of the
generated binary executables.

Is This Answer Correct ?    6 Yes 2 No

What do you mean by inline function?..

Answer / p suresh kumar

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.

Is This Answer Correct ?    10 Yes 8 No

What do you mean by inline function?..

Answer / ajay

body of a function is simply coded in a single line.these
are easily compiled

Is This Answer Correct ?    5 Yes 4 No

What do you mean by inline function?..

Answer / bujji

body of a function is simply coded in a single line.these
are easily compiled.

Is This Answer Correct ?    5 Yes 7 No

What do you mean by inline function?..

Answer / poornima.r

the c++ provides a mechanism called inline function.when a function is declared as inline function,the complier copies the code of the function in the calling function

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More OOPS Interview Questions

WHAT IS THE DIFFERENCE BETWEEN ABSTRUCTION AND ENCAPSULATION? PLEASE EXPLAIN IT.

7 Answers   ETH,


who is the founder of c++?

15 Answers   Hexaware, ONGC,


1.explicit call for destructor 2.calling function inside a constructor. 3.base *b-new derived delete b; 4.delete p what it will delete. 5.size of base class and derived class int i,in base class and int j in derived. 6.int i-20 int main() { int i =5; printf("%d".::i); { int i =10; printf("%d".::i); } } 7.object slicing 8.new 9.function overloading(return type). 10.class base() { virtuval fun() { ----- } } class derivied:public base() { fun() { ----- } } int main() { derived d; } 11.how static function will call in C++? 12.default structures are in C++? 13.constructors should be in public . 14.virtuval constructor not exist. 15.multilevel inhritence. destructor order.

1 Answers   Tech Mahindra,


What is abstraction encapsulation?

0 Answers  


How to overload postfix operator in c++

1 Answers   Mphasis,






Why is abstraction used?

0 Answers  


Why do we use oop?

0 Answers  


What is interface in oop?

0 Answers  


What is object in oop with example?

0 Answers  


any one please tell me the purpose of operator overloading

0 Answers   Amazon,


What is function overloading and operator overloading?

4 Answers  


Why do we use polymorphism in oops?

0 Answers  


Categories