Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is inline function?

Answer Posted / anoop raj

The point of making a function inline is to hint to the
compiler that it is worth making some form of extra effort
to call the function faster than it would otherwise -
generally by substituting the code of the function into its
caller. As well as eliminating the need for a call and
return sequence, it might allow the compiler to perform
certain optimizations between the bodies of both functions.

Sometimes it is necessary for the compiler to emit a
stand-alone copy of the object code for a function even
though it is an inline function - for instance if it is
necessary to take the address of the function, or if it
can't be inlined in some particular context, or (perhaps) if
optimization has been turned off. (And of course, if you use
a compiler that doesn't understand inline, you'll need a
stand-alone copy of the object code so that all the calls
actually work at all.)

There are various ways to define inline functions; any given
kind of definition might definitely emit stand-alone object
code, definitely not emit stand-alone object code, or only
emit stand-alone object code if it is known to be needed.
Sometimes this can lead to duplication of object code, which
is a potential problem for following reasons:

1. It wastes space.
2. It can cause pointers to what is apparently the same
function to compare not equal to one another.
3. It might reduce the effectiveness of the instruction
cache. (Although in lining might do that in other ways too.)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of #pragma exit?

1112


how logic is used

1917


Explain high-order bytes.

1061


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

1099


What is the c value paradox and how is it explained?

992


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1729


explain what are actual arguments?

1032


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

1026


What is c value paradox explain?

1020


What the advantages of using Unions?

1164


What is sizeof array?

1002


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

1986


Explain the concept and use of type void.

1060


Explain what is the difference between text files and binary files?

1096


What is wrong with this initialization?

955