What is inline function along with it's real time example.
can any one tell the ans of above question.
Replies
-
Ankita Katdare@#-Link-Snipped-# What do you mean by a real life example?
-
sagar saleit means that actually where we can use inline function in real time
-
Ankita KatdareWhenever Inline Functions are called, the compiler inserts the complete body of the function in every place that the function is called.
This is different from generating code to call the function in the one place it is defined.
I assume that you're asking the advantages of using Inline Functions.
If you are developing really small and simple programs, use of inline functions is great, because it reduces the overhead of -
1. calling function
2. variables push and pop on stack (that happens during call to functions)
3. return call from function -
Anand Tamariya@#-Link-Snipped-#, what programming language are you familiar with?
-
sagar saleyes sir,I am familier with c++.
-
Anand TamariyaInlining won't make much sense unless you understand a little bit about assembly or machine language. A function call involves overhead as the CPU has to keep track of current instruction pointer, then allocate stack space for the function call, execute the same and finally, restore the instruction pointer. With inlining, the code is in sequence and hence this overhead is not required.
-
sagar saleThank you sir.
You are reading an archived discussion.
Related Posts
A new tiny bladder pressure sensor developed by Norwegian engineers may provide the much needed relief to those suffering from neurological disease that makes them unable to control their bladder....
Daktronics, world's leading provider of full-color displays and Jacksonville Jaguars, one of the 32 member clubs of the National Football League, have come together and are all set to unveil...
There is a free webinar on the properties of heat transfer fluid and system maintenance:
https://vts.inxpo.com/scripts/Serve...S!10100&ShowKey=18541&AffiliateData=eblast2ph
Updated: Java or .Net: Which technology offers better future and career options in 2023? Let's analyse opportunities and careers to prepare for the future.
PCIe 1.x offers BW of 8 GBps
PCIe 2.x offers BW of 16 GBps
PCIe 3.x offers BW of 32 GBps
I would like to know whether the PCIe slots...