What is inline Function in C++ in Hindi Language Puri Jankari:  Programming me function ka main objective memory Program ko small size ka bna kar memory save krna hota hai.

Lekin function create krna tbhi uchit hota hai jab program jarurt se jyada Bada ho ya Uss program ko bar – bar use kiya jaana ho, kyuki jitni baar function ko call kiya jata hai, To function ko call kr execute krne pr calling time bhi alag se lagta hai, if function bahut Bade hai to call krne me kafi extra time lagta hai, jisse program ke processing speed kafi Slow ho jaati hai.

It means function banane se program me memory space bachta h but execution time badh Jata hai. Isliye is prakar ke function ko call krna ek prakar ka overload ho jata hai.

So Is problem ko solve krne ke Liye C language me micro function ka use Kiya Jaata hai.

But C++ me is problem ko different solution Kiya Gya hai. Jise Inline function kahte hai. Ye function ek special function hai jo small function ko bar – bar call krne ki problem ko solve krta hai, Jaise hi inline function ko evoke Kiya Jata hai tb waha per yeh apne corresponding Se expand ho Jata hai.

Syntax:- 

Inline returntype functionname c parameter

{

 body of function

}

what is inline function in c++ in hindi language
what is inline function in c++ in hindi language

Here Is The Example Of Inline Function

#include <iostream.h>

#include<conio.h>

Inline float multi (float x float y)

{

Return (x * y);

}

Void main () {

float a = 15.25; float b = 10.05; cout<<”multi:”<<multi(a,b);

getch(); }

 

What are inline functions limitations in C++

Inline function Kuch situation pr work Nahi krta hai::

  • For function returning value if a loop a switch or a go-to exists.
  • For function not returning value if a return statement exists.
  • If a function contains the static variable.
  • If the function is recursive.

Making an inline member function in C++ in Hindi (Video Guide)

Class me member function ko inside or outside dono prakar se define Kiya Jaa Sakta hai, class ke Anderfunction by default inline Hote hai.

More Tags: What is the Inline function in Hindi, What is inline Function in C++, How Inline Function Works in Hindi, Inline Function Examples, Inline Function Limitations in Hindi.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.